每2小时自动点击一次按钮 [英] auto click button every 2 hours

查看:90
本文介绍了每2小时自动点击一次按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< button title =data-original-title = =tooltipdata-title =Boost  this  devicedata-placement =rightdata-trigger =hoverclass = btn btn-xs btn-link boost> < / button>



更喜欢用户脚本但不知道如何在ubuntu上运行firefox并使用greasemonkey



确定所以我犯了一个错误就是每隔3个小时我没有编码经验。这就是我要求编写脚本的原因。

<button title="" data-original-title="" rel="tooltip" data-title="Boost this device" data-placement="right" data-trigger="hover" class="btn btn-xs btn-link boost"></button>

would prefer a userscript to do it but don't know how to do it running firefox on ubuntu with greasemonkey

ok so i made a mistake it's every 3 hours and I have no coding experience. That is the reason I asked for a script.

推荐答案





首先,它不建议从脚本执行按钮点击,但是我们可以在一定时间内调用嵌入式函数。

Hi,

First of all, it is not recommended to perform button click from script however, we can call the embedded function with certain time duration.
<html>
	<head>
 	<script>
	function buttonClick()
		{
			document.getElementById("output").innerHTML += "Clicked!  ";
			setTimeout(function(){
				buttonClick()
			}, 1000);
		}
		
     </script>
 </head>
	<body>
	<button onclick="buttonClick()">Click Me </button>
	
	</body>
</html>



适用于您的场景,持续时间应为7200000.



谢谢


for your scenario the time duration should be 7200000.

Thanks


这篇关于每2小时自动点击一次按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆