單擊窗口的關閉小按鈕時有什麼事情呀? 会出发"beforeonunload"事件。<html><body beforeonunload="alert('close this window')">test page</body></html> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对不起,写错了,是触发:onBeforeUnload事件 那样刷新时也会触发<script>function window.onbeforeunload(){ if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) { alert('要走了吗?'); }}</script> <body onunload="alert('aa')"> 怎么让 i 的值全程同步 javaScript+mysql+servlet怎么做登陆验证啊. 请教一个jquery的问题 求一段js代码,去[]中间的数据 openflashchart不知道为什么不能改变其背景色,有源码,大家有空看看 [jquery]shift + click 鼠标悬停表格可见,鼠标移开表格隐藏 ■■■不能动态输出js文件里面的内容? 高分求解 超简单问题 在线等 马上给分 怎样在保持原form内容的同时动态地加入一些其他元素(input,select等等) 关于正则表达式
function window.onbeforeunload()
{
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
{
alert('要走了吗?');
}
}
</script>