onclick event activation
I am sending web requests to a site and getting the responsestream and would like to perform the button click programatically, here is the tag for the event:
<a href="#" onclick="getResults('app开发者_运维知识库le', 2); return false;" id="nextLink" class="next button_grey_sm">Next »</a>
any ideas appreciated?
I used a web browser control... it might not have been the best approach since I don't know what page it's on, but here's my code:
Dim wb As WebBrowser = New WebBrowser
wb.Navigate("http://www.mydomain.com")
wb.Document.GetElementsByTagName("a")(2).InvokeMember("click")
This basically "clicks" the 3rd (the array is 0-based) tag on the current page.
HTH
精彩评论