复制代码 代码如下:
<script type="text/javascript">
var second = 0;
var minute = 0;
var hour = 0;
window.setInterval("OnlineStayTime();", 1000);
function OnlineStayTime() {
second++;
if (second == 60) {
second = 0;
minute++;
}
if (minute == 60) {
minute = 0;
hour++;
}
window.status = "停留时间" + hour + ":" + minute + ":" + second;
}
</script>
<script type="text/javascript">
var second = 0;
var minute = 0;
var hour = 0;
window.setInterval("OnlineStayTime();", 1000);
function OnlineStayTime() {
second++;
if (second == 60) {
second = 0;
minute++;
}
if (minute == 60) {
minute = 0;
hour++;
}
window.status = "停留时间" + hour + ":" + minute + ":" + second;
}
</script>
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“javascript显示用户停留时间的简单实例”评论...