开发者

Why is programmatic click not working on IE or Chrome?

I'm using this bookmarklet to programmatically click on the search button in Google's Keyword Tool:

javascript:document.getElementById("gwt-debug-searchPanel-searchButton").click();

I also tried this in IE with no luck:

javascript:document.getElementById("gwt-debug-searchPanel-searchButto开发者_JAVA百科n").fireEvent("onclick");

It actually worked once but then it didn't work anymore. It works fine on Firefox, but not on Chrome or IE. Any idea why?


That button is likely going to submit a form, why not submit the form with Javascript? You are always allowed to do that.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜