I won’t say much nonsense, I will just post the code to you. The specific code is as follows:
<!DOCTYPE html><html lang=en xmlns=http://www.w3.org/1999/xhtml><head> <meta charset=utf-8 /> <title></title> <style type=text/css> #result{ width:500px; border:1px solid #CCCCCC; background:#FFFCC; margin:50px auto; font-size:24px; color:#FF0000; padding:20px; } </style> <script type=text/javascript> window.onload = function () { showTime(); var start = document.getElementById(start); start.onclick=function () { var path = document.getElementById(path).value; var time1 = document.getElementById(time1).value; var time2 = document.getElementById(time2).value; var time3 = document.getElementById(time3).value; start.value = Wait for the opening of the order grab page; setInterval(function () { var date = new Date(); var hour = date.getHours(); var minute = date.getMinutes(); var second = date.getSeconds(); if (hour == time1 && minute == time2 && second == time3) { window.open(path); } }, 100); }; } function showTime() { //Create the Date object var today = new Date(); //Fetch out year, month, day, hour, minute, and second respectively var year = today.getFullYear(); var month = today.getMonth()+1; var day = today.getDate(); var hours = today.getHours(); var minutes = today.getMinutes(); var seconds = today.getSeconds(); //If it is a single number, add 0 month before it = month<10 ? 0+month : month; day = day <10 ? 0+day : day; hours = hours<10 ? 0+hours : hours; minutes = minutes<10 ? 0+minutes : minutes; seconds = seconds<10 ? 0+seconds : seconds; //Construct the string to be output var str = year+year+month+month+day+day+hours+:+minutes+:+seconds; //Get the object of id=result var obj = document.getElementById(result); //Write str's content into <div> with id=result to obj.innerHTML = str; //Delay window.setTimeout(showTime(),1000); } </script></head><body> <div> <h2>1, Synchronize computer time and Beijing time</h2> <h2>2, Set the path address to the address and the time to grab the coupon</h2> <!--<h3>Coupon address</h3><input type=text id=path />--> <h3>Coupon grab address (be careful not to miss http:// or https://)</h3> <!--<textarea id=path style=width:200px;height:80px;></textarea>--> <input type=url id=path style=width:auto/> <h3>Coupon grab time</h3> <input type=text id=time1 />time<input type=text id=time2 />min<input type=text id=time3 />seconds<h2>3, click to wait, and then click to grab coupon</h2> <input type=button id=start value=start/><div id=result></div> </div></body></html> SummarizeThe above is the HTML implementation of Double 11 (set time to open the page for grabbing coupons) introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support to Wulin.com website!