开发者

Why is programmatic click not working on IE or Chrome?

开发者 https://www.devze.com 2023-03-12 20:37 出处:网络
I\'m using this bookmarklet to programmatically click on the search button in Google\'s Keyword Tool:

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

精彩评论

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