我的意思就是当我点击关闭或刷新的时候,在onbeforeunload中作一个confirm
用户点ok的时候才onunload(关闭或刷新)?
---------------------------------------------------------------
1<script language="javascript">
2function window.onbeforeunload()
3{
4if (event.clientX>document.body.clientWidth && event.clientY<0 ¦ ¦event.altKey)
5{
6var myWin = window.open('http://www.csdn.net')
7//window.event.returnValue=""; 页面提示
8}
9
10}
11</script>
试试
:_)