function show_time(){ var time_start = new Date("2013/10/01 00:00:00").getTime();//设定开始时间 var time_end = new Date().getTime(); //设定结束时间(等于系统当前时间) //计算时间差 var time_distance = time_end - time_start; if(time_distance > 0){ // 天时分秒换算 var int_day = Math.floor(time_distance/86400000) time_distance -= int_day * 86400000;
var int_hour = Math.floor(time_distance/3600000) time_distance -= int_hour * 3600000;
var int_minute = Math.floor(time_distance/60000) time_distance -= int_minute * 60000;