开发者

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);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜