87,994
社区成员




<script language="javascript">
g_blnCheckUnload = true;
function RunOnBeforeUnload() {
if (g_blnCheckUnload)
{//注意异常的捕获
try{
window.event.returnValue = 'You will lose any unsaved content';
}catch(e){}
}
}
</script>
<body onbeforeunload="RunOnBeforeUnload()">
</body>
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>11</title>
<script>
window.onbeforeunload = function(){alert()};
</script>
</head>
<body>
</body>
</html>