IHTMLWindow2 Win = (IHTMLWindow2)webBrowser1.Document.Window.DomWindow;string s = "alert('x');";Win.exeScript(s,"javascript");