18168733823 在线客服 意见反馈 返回顶部
行业动态 技术分享

企业建站之网站运行时间统计

2019-12-28 分享

效果图

网站建设

<span id="span_dt_dt"></span>

<script>
function show_date_time() {
   window.setTimeout("show_date_time()", 1000);
   BirthDay = new Date("10/15/2018 17:47:39");
   today = new Date();
   timeold = (today.getTime() - BirthDay.getTime());
   sectimeold = timeold / 1000;
   secondsold = Math.floor(sectimeold);
   msPerDay = 24 * 60 * 60 * 1000;
   e_daysold = timeold / msPerDay;
   daysold = Math.floor(e_daysold);
   e_hrsold = (e_daysold - daysold) * 24;
   hrsold = Math.floor(e_hrsold);
   e_minsold = (e_hrsold - hrsold) * 60;
   minsold = Math.floor((e_hrsold - hrsold) * 60);
   seconds = Math.floor((e_minsold - minsold) * 60);
   span_dt_dt.innerHTML = "网站已平稳运行:" + daysold + "" + hrsold + "小时" + minsold + "" + seconds + "";
}
show_date_time();

</script>
在线咨询
Copyright © 2019 江苏如斯镁科技有限公司 版权所有 苏ICP备19052370号-3   友情链接: 在线商城 网站地图