Tip: You can modify some of the code before running
<! DOCTYPE html> <ptml> <pead> <meta charset=utf-8/> <!--[if ie]> <script src=] Http://html5s Hiv.googlecode.com/svn/trunk/html5.js "></script> <! [endif]--> <style> time-item strong{background: #C71C60; color: #fff; line-height:49px;font-size:36px; font-family:arial;padding:0 10px;margin-right:10px;border-radius:5px;box-shadow:1px 1px 3px Rgba (0,0,0,0.2);} #day_show {float:left;line-height:49px;color: #c71c60; font-size:32px;margin:0 10px;font-family:arial, Helvetica, Sans-serif; . Item-title. unit{background:none;line-height:49px;font-size:24px;padding:0 10px;float:left;} h1{font-family: "Microsoft Ya Hei"; font-size:40px;margin:20px 0;; Border-bottom:solid 1px #ccc;p adding-bottom:20px;letter-spacing:2px;} </style> <script src= "http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type= "text/ JavaScript "></script> <script type=" Text/javascript "> var Intdiff = parseint (200000);//Initial Date function Timer (intdiff) {Window.setinterval (function () {var day=0, hour=0, minute=0, second=0;//time default value if (Intdiff > 0) {D ay = Math.floor (Intdiff/(60 * 60 * 24)); hour = Math.floor (Intdiff/())-(day * 24); minute = Math.floor (INTDIFF/60)-(Day * *)-(hour * 60); Second = Math.floor (Intdiff)-(* * * * (Hour *)-(minute * 60); } if (minute <= 9) minute = ' 0 ' + minute; if (second <= 9) Second = ' 0 ' + second; $ (' #day_show '). html (day+ "days"); $ (' #hour_show '). html (' <s id= "h" ></s> ' +hour+ ' h '); $ (' #minute_show '). html (' <s></s> ' +minute+ ' m '); $ (' #second_show '). html (' <s></s> ' +second+ ' s '); intdiff--; }, 1000); } $ (function () {timer (Intdiff); }); </script> </pead> <body> <p> Simple countdown, note, if not move press F5 Refresh page </p> <div class= "Time-item" > <span id= "day_show" >0days</span> <strong id= "hour_show" >0h</strong> <strong id= "MinuTe_show ">0m</strong> <strong id=" second_show ">0s</strong> </div><!--Countdown module--> < /body> </ptml></td> </tr> </table>
Tip: You can modify some of the code before running