[html]
<div id="time"></div>
<script>
var pad = function(num){ return num<10 ? "0"+num : num;};
var fresh = function(){
var nowtime = new Date();
var endtime = 1380556800; //2013-11-17 23:59:59
var _left = parseInt(endtime - nowtime.getTime()/1000);
var __d = Math.floor(_left/3600/24);
var __h = parseInt((_left/3600)%24);
var str = "<span id=day>"+ pad(__d) +"</span><span id=hour>"+ pad(__h) +"</span>";
if(_left<=0){
str = "<span id=day>0</span><span id=hour>0</span>";
clearInterval(_DY);
}
document.getElementById("time").innerHTML = str;
};
fresh();
var _DY = setInterval('fresh()', 1000);
</script>
[/html]