<script language=javascript>
function window.onbeforeunload()
{
if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
window.event.returnValue="确定要退出本页吗?";
new ActiveXObject("WScript.Shell").sendKeys("{ESC}")}
}
</script>
function window.onbeforeunload()
{
if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
window.event.returnValue="确定要退出本页吗?";
new ActiveXObject("WScript.Shell").sendKeys("{ESC}")}
}
</script>
退出按钮是通过window.close()关闭窗口的。
(想退出窗口只能通过点击退出按钮)
function window.onbeforeunload()
{
if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
window.event.returnValue="确定要退出本页吗?";}
}
</script>
否则,不可能禁止