求大神帮帮忙WebBrowser

解决方案 »

  1.   

    WebBrowser可以直接取值,什么叫模拟鼠标移动到指定链接这个“动作”?
      

  2.   

    拿现在这个贴来说,在WebBrowser里把鼠标移动到这个位置上
      

  3.   

    通过webbrowser的htmlElement 你可以实现直接点击链接的动作
      

  4.   

    先在控件里获取到连接的位置,并转换为屏幕坐标,
    然后C# Win32API 模拟鼠标移动及点击事件
    http://www.cnblogs.com/08shiyan/archive/2011/07/18/2109086.html
      

  5.   


    HtmlElement html= webBrowser1.Document.GetElementById("id");
    html.InvokeMember("click");
      

  6.   


    HtmlElement password = webBrowser1.Document.All.GetElementsByName("password")[0];//通过name获取
                        password.InnerText = "456abc";
                        password.InvokeMember("click");
                        password.Focus();//有些页面给控件添加了Focus属性
     HtmlElement regemailinput = webBrowser1.Document.GetElementById("regemailinput");//通过ID获取
                         regemailinput.InvokeMember("click");
                        
      

  7.   

    refer :
     private void Form1_Load(object sender, EventArgs e)
            {
                this.webBrowser1.Url = new Uri("http://www.baidu.com");
            }        private void button1_Click(object sender, EventArgs e)
            {
                HtmlElement searchWords = webBrowser1.Document.All["kw"];
                HtmlElement searchButton = webBrowser1.Document.All["su"];
                searchWords.SetAttribute("value", "guwei4037");
                searchButton.InvokeMember("click");
            }
      

  8.   

    如果页面有框架,可以这么做。
    2
    3
    4
    5
    6
    7
    HtmlDocument htmlDoc = webBrowser1.Document.Window.Frames["mainFrame"].Document;
     
                    if (htmlDoc != null)
                    {
                        string qssj = htmlDoc.All["ajc10a"].GetAttribute("value");
                        string jssj = htmlDoc.All["ajc10b"].GetAttribute("value");
                    }
      

  9.   

    HtmlDocument 里面有个取元素的方法具体名字不记得的