问题如上:就是我想获得用webbroswer打开的网页上一个textbox或者label的值

解决方案 »

  1.   

     webBrowser1.Document.GetElementById("d")
      

  2.   

           
    获取GOOGLE搜索框里的内容   private void Form1_Load(object sender, EventArgs e)
            {
                webBrowser1.Navigate("http://www.google.cn/");
            }        private void button1_Click(object sender, EventArgs e)
            {
                MessageBox.Show(webBrowser1.Document.GetElementById("q").GetAttribute("value"));
            }
      

  3.   

    恩,webBrowser1.Document也就你要的东西
    基本上这里的document就相当与js里面的那个document的概念(呵呵,实际就是一个东西)
      

  4.   

    http://blog.csdn.net/ec8483/archive/2007/12/10/1926829.aspxhttp://www.apc001.com/2008-06/29/net-20%E5%AE%9E%E4%BE%8B%E5%AD%A6%E4%B9%A0%EF%BC%9Awebbrowser%E9%A1%B5%E9%9D%A2%E4%B8%8Ewinform%E4%BA%A4%E4%BA%92%E6%8A%80%E5%B7%A7/http://www.chenjiliang.com/Article/View.aspx?ArticleID=1918&TypeID=79给你几篇WebBrowser与WinForm的交互技巧参考下