第1个回答 2013-08-29
点击关了就关了,不需要写什么,判断是否点了关闭var n = window.event.screenX - window.screenLeft; var b = n > document.documentElement.scrollWidth - 20; </SPAN></li> if (b && window.event.clientY < 0 || window.event.altKey) </SPAN></li> { alert('onclick window close'); </SPAN></li> }