var timestamp=new Date("2017/04/21 00:00:00").getTime();
function showtime(){
var nowtime=new Date().getTime();
if(nowtime<timestamp){
var timeC=parseInt(timestamp-nowtime);
var myhour=buling( parseInt(timeC/3600000) )
var mymin=buling( parseInt( (timeC-myhour*3600000)/60000 ) )
var mysec=buling( parseInt( (timeC-myhour*3600000-mymin*60000)/1000 ) )
var mytime=myhour+":"+mymin+":"+mysec;
$("#mytime").html(mytime)
}else{
window.top.location.href="{:U('happybirthday')}"
}
}
function buling(el){
if(el<10){
return "0"+el;
}
return el;
}
setInterval(showtime,1000);