您的位置:首页 > Web前端 > HTML

html 无提示关闭窗口

2016-10-15 10:24 197 查看
无提示关闭窗口代码如下:

closeWindow.html

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>无提示关闭窗口</title>
<style type="text/css">
input[type=button]{border: 1px solid lightgrey}
</style>
</head>
<body>
<input type="button" name="Submit2" value="关闭窗口" title="关闭窗口" onclick="shut()"/>
<script type="text/javascript">
function shut(){
window.opener=null;
window.open('','_self');
window.close();
}
</script>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  html window