[英]Javascript: Automation of button click
I'm generation a html button:我正在生成一个 html 按钮:
<a href="javascript:void(0);" onclick="imageWin(12344,'yyyy','120','someId');" class="Button">Click</a>
But I'm trying to automate clicking on the button using javascript.但我正在尝试使用 javascript 自动点击按钮。
Any of you knows how can I do this?你们有人知道我该怎么做吗?
You can try it :你可以试试看 :
var btn = document.getElementByClassName("Button");
btn.click();
or imageWin(12344,'yyyy','120','someId')
或imageWin(12344,'yyyy','120','someId')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.