代码如下
<html>
<body>
<script language = 'javascript'>
document.write("<hr>");
document.write("<h3>示例 3.12 TimeOut的设定</h3>");
document.write("<hr />");
function nw()
{
var w = window.open();
w.document.open();
w.document.write("<html><body>请等待5秒后关闭......\n");
w.document.write("<script language = 'javascript'>\n");
w.document.write("function nc(){window.close();}\n");
w.document.write("setTimeOut('nc()', 500);\n");
w.document.write("<"+"/script>");
w.document.write("</body>\n");
w.document.write("</html>\n");
w.document.close;
}
document.write("<input type = 'button' value = 'TimeOut窗口' onClick = 'nw()'/>");
document.write("<hr />");
</script>
</body>
</html>
网页错误详细信息用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2)
时间戳: Thu, 31 Mar 2011 04:36:04 UTC
消息: 缺少对象
行: 4
字符: 1
代码: 0
URI: file:///H:/wwwroot/www/Html/html25_TimeOut的设定/html25.html