【 tulaoshi.com - ASP.NET 】
很简单的代码,如下:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403629326.gif)
using mshtml;
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403629326.gif)
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403629326.gif)
object x = System.Reflection.Missing.Value;
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403629326.gif)
axWebBrowser1.Navigate(@"你的网页地址", ref x, ref x, ref x, ref x);
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403629326.gif)
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403629326.gif)
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403629326.gif)
private void axWebBrowser1_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403786787.gif)
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403722517.gif)
...{
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403768737.gif)
mshtml.IHTMLDocument2 doc = (mshtml.IHTMLDocument2)axWebBrowser1.Document;
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403768737.gif)
mshtml.IHTMLWindow2 win = (mshtml.IHTMLWindow2)doc.parentWindow;
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403768737.gif)
win.execScript("document.body.style.overflow='hidden';","javascript");
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652221403754191.gif)
}