JS 倒计时
<!doctype html>
<html>
<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秒</span>
</div>
<div id="mrt2">05</div>
<script>
function djs_mrt(){
var EndTime= new Date('2014/12/20 00:00:00');
var NowTime = new Date();
var t =EndTime.getTime() - NowTime.getTime(); //getTime() 为1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
var d=Math.floor(t/1000/60/60/24);
var h=Math.floor(t/1000/60/60%24);
var m=Math.floor(t/1000/60%60);
var 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 + "秒";
}
function sjs_mrt(){
var x = parseInt(Math.random()*10); ;
document.getElementById("mrt2").innerHTML = "0"+x;
}
setInterval(sjs_mrt,1000);
setInterval(djs_mrt,0);
</script>
</body>
</html>