网站/任意页面底部加上已运行时间,只需加上这段代码即可:
<script data-no-instant>
function show_date_time(){window.setTimeout("show_date_time()",1e3);
var BirthDay=new Date("2012/02/12 12:13:14"),
today=new Date,timeold=today.getTime()-BirthDay.getTime(),msPerDay=864e5,
e_daysold=timeold/msPerDay,daysold=Math.floor(e_daysold),
e_hrsold=24*(e_daysold-daysold),
hrsold=Math.floor(e_hrsold),
e_minsold=60*(e_hrsold-hrsold),
minsold=Math.floor(60*(e_hrsold-hrsold)),
seconds=Math.floor(60*(e_minsold-minsold));
span_dt_dt.innerHTML="本站已运行"+daysold+"天"+hrsold+"小时"+minsold+"分"+seconds+"秒";}
show_date_time();
</script>
<div style="color:black font-family"宋体":" id ="span_dt_dt"></div>