<!doctype html> <html> <head> <meta charset =“ utf-8”> <title> <title> js js js </title> </title> <style>**{margin:0;填充:0;列表风格:无;} Body {font-size:18px;文本 - align:中心;}。时间{高度:30px;填充:200px;} </style> </head> <body> <div> <span ID =“ t_d”> 00天</span> <span ID =“ t_h”>00时</span> <span> <span ID =“ t_m”> 00 00 </span> </span> <span ID <span ID =“日期('2014/09/20 00:00:00'); var nowtime = new Date(); var t = endtime.getTime() - NowTime.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); </script> </body> </html>