复制代码 代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>显示停留时间</title>
</head>
<body>
<form name="form1" method="post" action="">
<center>
<p><font size="5" color="#0000FF" face="华文细黑">您在本站已停留:</font></p>
<p>
<input name="textarea" type="text" value="">
</p>
</center>
<script language="javascript">
var second=0;
var minute=0;
var hour=0;
window.setTimeout("interval();",1000);
function interval()
{
second++;
if(second==60)
{
second=0;minute+=1;
}
if(minute==60)
{
minute=0;hour+=1;
}
document.form1.textarea.value = hour+"时"+minute+"分"+second+"秒";
window.setTimeout("interval();",1000);
}
</script>
</form>
</body>
</html>
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!