Click in a image/function with javascript on Greasemonkey?
How can I click 开发者_Python百科in a image/function with javascript?
Something like:
document.getElementById("check-in-banner").click();
the source of the part is
<a id="check-in-button" href="#">
Thank you very much
var el = document.getElementById("check-in-button");
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
el.dispatchEvent(evt);
精彩评论