<span id=”runtime_span” style=”color: #9b51e0;font-weight:bold”></span>
<script type=”text/javascript”>
function show_runtime(){
window.setTimeout(“show_runtime()”,1000);
X = new Date(“01/06/2016 5:22:00”);//这里修改时间
Y = new Date();
T = (Y.getTime()-X.getTime());
M = 24*60*60*1000;
a = T/M;
A = Math.floor(a);
b = (a-A)*24;
B = Math.floor(b);
c = (b-B)*60;
C = Math.floor((b-B)*60);
D = Math.floor((c-C)*60);
runtime_span.innerHTML=”本站已经稳定运行: “+A+”天”+B+”小时”+C+”分”+D+”秒”
}
show_runtime();
</script>
. 原文出自[XXX] 转载请保留原文链接: https://www.devskyr.com/2368.html