日期:2014-05-17  浏览次数:20666 次

很困难的问题,懂的一定是顶尖高手!不说假话。
http://guba.eastmoney.com/list,300027.html

这个发布键怎么点击它。不用API模拟点击。在WEBBROWER控件内,有没有办法?各位高手。

------解决方案--------------------
post方式模拟提交表单
------解决方案--------------------
怎么又是你...


标题<input type="text" name="" class="gbsformi1" id="gbtaintitle" maxlength="80" />
内容<textarea class="gbsformt1" id="gbtainput"></textarea>
发布<button type="submit" class="gbsformi3">
清除<input type="reset" id="gbsformreset" class="gbsformi4" value=" " />


点击发布按钮有很多办法..执行他的click 或者表单提交 

或者直接form1.submit()都可以的..
------解决方案--------------------
引用:
Quote: 引用:

post方式模拟提交表单


暂时不想学POST,最终还是POST最牛。不过,水平有较,求教大家用控件的。



不要看post那么多代码什么的。
其实你只要懂几处就可以了
head
cookie
postdata

就基本ok

复杂的我这也不多说。你的慢慢来。
------解决方案--------------------
不要一味得认为填表比post容易。这是一个普遍的错误。
楼主也要记住
------解决方案--------------------
说也说过了

听不听随你

不过帮忙还是要帮的 

public Form1()
        {
            InitializeComponent();
            webBrowser1.Navigate("http://guba.eastmoney.com/list,300027.html");
        }

        private void button1_Click(object sender, EventArgs e)
        {
            webBrowser1.Document.GetElementById("gbtaintitle").SetAttribute("value", "ddddddd11");
            webBrowser1.Document.GetElementById("gbtainput").SetAttribute("value", "ddddddd22");
            foreach (HtmlElement i in webBrowser1.Document.GetElementsByTagName("button"))
            {
                if (i.GetAttribute("classname") == "gbsformi3")
                {
                    i.InvokeMember("click");
                    break;
                }
            }
        }