倒记时60刷新网页的js代码

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

倒记时60刷新网页的js代码

  2020-05-13 我要评论
复制代码 代码如下:

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>60刷新本页</title>
<script type="text/javascript">
var t;
t=60;
function shua()
{
t=t-1;
document.getElementById("hints").innerHTML="离下次刷新时间还有 "+t+" 秒";
if (t==0)
{
document.location.reload();
}
}
</script>

</head>
<body onload="window.setInterval(shua,1000);">
<center>
<font id="hints" style="color:blue" >离下次刷新时间还有60秒</font><br/>
<center>
</body>
</html>

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们