<! doctype html> <html> <éadf> <meta charset = "utf-8"> <tight> 简单易用的倒计时 js 代码 </tape> <style> * {margin: 0; rembourrage: 0; Style de liste: Aucun;} Body {Font-Size: 18px; Text-Align: Center;}. Time {Height: 30px; Padding: 200px;} </pyle> </ head> <body> <div> <span id = "t_d"> 00 天 </span> <span id = "t_h"> 00 时 </span> <span id = "t_m"> 00 分 </span> <span id = "t_s"> 00 秒 </pan> </v> </vrient> function getrtime () {VaRIME = NEWLIME = New Date ('2014/09/20 00:00:00'); var nowtime = new Date (); var t = endtime.getTime () - maintenantTime.getTime (); var d = 0; var h = 0; var m = 0; var s = 0; if (t> = 0) {d = math.floor (t / 1000/60/60/24); h = math.floor (t / 1000/60/60% 24); m = math.floor (t / 1000/60% 60); s = math.floor (t / 1000% 60); } document.getElementById ("t_d"). innerhtml = d + "天"; document.getElementById ("t_h"). innerhtml = h + "时"; document.getElementById ("t_m"). innerhtml = m + "分"; document.getElementById ("t_s"). innerhtml = s + "秒"; } setInterval (getrtime, 0); </cript> </ody> </html>