如何捕捉网页被关闭事件,并进行相应处理? <body onunload="javascript:alert('asdfds')"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 点击X来关闭当前网页<script language=javascript>function window.onbeforeunload(){if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){ window.event.returnValue="确定要退出本页吗?";}}</script> javascript prototype 关于createPopup建立的一个奇怪问题 怎么才能让js进行点击 谁否在右键中添加一功能:把一链接中的文本通过右键来复制? javascript里for循环里sendrequest,sendrequest返回的是一样的值 急救,对超级连接如何确认??? 使页面加载时就刷新页面的代码怎么写? 我如果没分了,咋办! 一个table程序 up有分 go-->300分的问题 该代码问题出在哪里??大家帮涡看看哦 这一小段代码为什么不对? 急!请问怎样用javascript模拟shift+TAB键
<script language=javascript>
function window.onbeforeunload()
{
if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
window.event.returnValue="确定要退出本页吗?";}
}
</script>