现在的位置: 首页 > 综合 > 正文

window.close() 不出现提示“是否要关闭本窗口”

2018年04月10日 ⁄ 综合 ⁄ 共 444字 ⁄ 字号 评论关闭

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<script language="javascript">
function Close()
{   
    // 1000毫秒 关闭
    setTimeout("window.opener=null;window.close();return false",1000);
}
</script>
<body onload="Close()">
    <form id="form1" runat="server">
    <div>
   
    </div>
    </form>
</body>
</html> 

抱歉!评论已关闭.