JS seconds Kill

Source: Internet
Author: User

Seconds Kill activity Page
<! DOCTYPE html><Html><Head><Metahttp-equiv="Content-type"Content="Text/html; charset=gb2312 "><Title> Micomo</Title></Head><Body><Div><P> Activity Countdown<StrongId="Endtime" ></strong> seconds!</P><InputType="Button"Id="BTN"Value="Buy Now"Disabled="Disabled"onclick="Func ()"/></Div><ScriptSrc="/js/jquery-2.1.1.min.js" ></Script><ScriptType="Text/javascript" > Countdown 30 secondsvar i =30;functionRemaintime() {if (i >0) {document.getElementById ("Endtime"). InnerHTML = i--; SetTimeout ("Remaintime ()",1000); }if (i = = 0) {$ ( "P"). Text ( "P"). CSS ( "Background-color",  " Yellow "); //countdown End, button state changed to usable document.getElementById ( "BTN"). Disabled = Span class= "Hljs-literal" >FALSE; }} remaintime (); //Click Button Trigger method function func () {alert ( "Congratulations on grabbing a mooncake");} </script> </body ></HTML>       
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21st
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43

Page Preview

Script JS

Code

<script type="text/javascript"> var button = document.getElementById("btn"); //每秒执行一次,若按钮状态为可用,进行点击 setInterval(function() { if (button.disabled == false) { button.click(); } }, 1000);</script>
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11

The SetInterval () method invokes a function or evaluates an expression according to the specified period (in milliseconds).
The SetInterval () method keeps calling functions until Clearinterval () is called or the window is closed.

How to put it in a browser

Browser to open the active page, press F12 into the debug mode, find the console console, the above JS script tags inside the code to paste into (do not label), click Enter, must be in the event before the end of the put in.

Results Preview

Modify the Millisec (in milliseconds) in setinterval (function () {},millisec) to control the click Frequency.

    • This is just a simple JS code, does not implement verification code automatic verification.

    • can refer to the study, do not take to do unethical, for the benefit of the matter.

    • Personal blog, only used to make some notes, do not guarantee the correctness of the content, if found wrong, implore correction.

2016/11/10 Supplement

Baidu Browser points Redemption

Open the following page, press F12, put the code under console, enter.


Code snippet

    Select the <a> label for Data-id 6var button = $ ("A[data-id= ' 6 ']");Execute once per second, click if the button status is availablevar fuc = setinterval (function() { ///If a button that refreshes the captcha appears, it indicates that the if ($ (". Refresh-btn") has been snatched. length >  0) {window.clearinterval (FUC); //Desktop notifications, only Chrome,firefox browser supports desktop API Notification.requestpermission (function(status) { var n =  New Notification (' notification message ', {body: ' iqiyi art member redemption code! ‘ }); }); } else {Button.Click ();}},1000); //One-second click                

JS seconds Kill

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.