不对不对,
不是axWebBrowser的方法!!

解决方案 »

  1.   

    那里能得到axWebBrowser控件,我试试
      

  2.   

    When the active document is an HTML page, this property provides access to the contents of the HTML Document Object Model (DOM). Specifically, it returns an HTMLDocument object reference. The HTMLDocument object is functionally equivalent to the HTML document object used in HTML page script. It supports all the properties and methods necessary to access the entire contents of the active HTML document. Microsoft® Visual Basic® programs that early bind to the HTMLDocument object can reference it through the IHTMLDocument, IHTMLDocument2, and IHTMLDocument3 interfaces. When other document types are active, such as a Microsoft Word document, this property returns the document automation object of that document. For Word documents, this would be the Document object. For more information on the Microsoft Office DOM, refer to the Microsoft Office Developer Center.
      

  3.   

    看看吧!是引用别人的话!
    ---------------------------------------------
    你可以参考以下这段例子代码:private void menuItem3_Click(object sender, System.EventArgs e){
    object url="http://www.google.com";
    object nothing=System.Reflection.Missing.Value;
    this.axWebBrowser1.Navigate2(ref url,ref nothing,ref nothing,ref nothing,ref nothing);
    }private void button1_Click(object sender, System.EventArgs e){
    try{
    mshtml.HTMLDocumentClass doc=(mshtml.HTMLDocumentClass)this.axWebBrowser1.Document;
    MessageBox.Show(((mshtml.HTMLInputElementClass)doc.all.item("q",0)).value);
    }
    catch(Exception ex){
    MessageBox.Show(ex.Message.ToString());
    }
    }在上面的例子中,点击menuItem3以后,webBrowser控件中会装载Google的首页。然后点击button1,就能够从webBrowser控件中读出<input type=text name=q>的控件的当前值。
    Hogwarts - S(u)ddenly dis@ppeared...

    本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。