<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/jscript" language="javascript">
var sm=10;
function closeit() {
setInterval("f();",1000);
setTimeout("window.opener=null;;self.close()",sm*1000) //单位是毫秒,这里是5秒
}
function f(){
ttt.innerText="还有"+sm+"秒窗口关闭!";
sm--;
}
</script>
</head>
<body οnlοad="closeit()">
<form id="form1" runat="server">
<div>
<asp:Label ID="ttt" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
定时关闭窗口
最新推荐文章于 2022-12-27 12:45:16 发布