用JS实现统计网站运行时间

缘由 看到一些网站有一个炫酷的网站运行时间的代码,就搞了一下。感觉不错!后来因拖慢网站就放弃了! 代码 <span id=sitetime></span> <script language=javascript> function siteTime(){ window.setTimeout(siteTime(), 1000); var seconds = 1000; var minutes = seconds * 60; var hours = minutes * 60; var days = hours * 24; var years = days * 365; var today = new Date(); var todayYear = today.getFullYear(); var todayMonth = today.getMonth()+1; var todayDate = today.getDate(); var todayHour = today.getHours(); var todayMinute = today......