<> background :

Often encounter the second kill lottery activities , Click the button on the website to kill the second , But the mouse can be very troublesome , So consider writing code to achieve automation .

<> method :

use Chrome browser , Right click the target button , click “ inspect ”, Some browsers are also called “ Review elements ”, Find the target button's id, For example, Baidu's button is :
<input type="submit" id="su" value=" use Baidu Search " class="bg s_btn">
here id namely su.
stay console in , Paste the following line of code :
setInterval(function(){document.getElementById(" Click the Id").click();},1000);
Then press enter . This code will be displayed in the 1000 Within milliseconds Click the button once .
If the target button is not written id, have access to class Search
document.getElementsByClassName(" Click the Class")[0].click(), here 0 Represents the number of 0 Elements

<> Correlation extension

setInterval Is a function that implements timing calls , According to the specified period ( In milliseconds ) To call a function or evaluate an expression .setInterval Methods call functions over and over again , until
clearInterval Called or window closed .

©2019-2020 Toolsou All rights reserved,
It's unexpected Python Cherry tree (turtle The gorgeous style of Library )Unity3D of UGUI Basics -- Three modes of canvas os Simple use of module computer network --- Basic concepts of computer network ( agreement , system )html Writing about cherry trees , Writing about cherry trees Some East 14 Pay change 16 salary , Sincerity or routine ?Unity-Demo Examples ✨ realization UI- Backpack equipment drag function 06【 Interpretation according to the frame 】 Data range filtering -- awesome java Four functional interfaces ( a key , simple )