开发者

c# javascript in browser

I am trying to automatically click on a button on a webpage. An example of the button can be found here: http://www.movshare.net/video/ut55cfdv开发者_开发百科g5wgj/?

I can get rid of it with javascript in firefox usin firebug, but when I'm trying the same script in c# with the browser controll it doesn't work.

The script is:

btn = document.getElementsByName("submit"); 
btn[0].click();

Any help would be nice.


.click would refer to the corresponding event, try;

.Document.All.GetElementsByName("submit")[0].InvokeMember("click");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜