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.
精彩评论