gaochunhu 发表于 2013-1-22 21:53:41

js判断是关闭窗口还是刷新窗口

<script type="text/javascript">    window.onbeforeunload=function window.onbeforeunload(){    if (document.body.clientWidth-event.clientX<21||event.altKey||event.ctrlKey){         alert("close");    }else{          window.event.returnValue="";          alert("refrash");          return false;   }}</script>
页: [1]
查看完整版本: js判断是关闭窗口还是刷新窗口