通常在使用关闭按钮关闭当前窗口或标签的时候会有讨厌的提示对话框,下面的代码就完美的解决了这个问题,点击关闭,窗口直接关闭没有任何提示。
示例:
<script>
function CloseWin()
{
window.opener=null;
window.open('','_self');
window.close();
}
</script>
<input type=button value="关闭" onclick="CloseWin()">