关于JS的窗体关闭事件!(在线等待.msn:[email protected]) 那段代码保存成了test.html文件,忘记说了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <HTML><HEAD><script language=javascript>function fun_click(){alert(close!);window.location.href="test.html?param=test";}</script></HEAD><BODY><INPUT TYPE="button" NAME="" value="Refresh" onclick="fun_click();"></BODY></HTML> 我只想要用户再关闭该ie窗体的时候弹出close! ,而在点击Refresh按钮或者按F5刷新的时候不弹出close!. <script>window.onbeforeunload =function(){if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) { alert("csdn某位blog里看到的,借用"); }} </script> if((event.clientX>document.body.clientWidth) || (event.clientY<0||event.altKey)) { alert("关闭"); }else{alert('刷新');} <body onbeforeunload="javascript:aaa();"><script language="javascript">function aaa(){if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey){alert("Close!!!");}}</script></body> 网页自动加载代码如何解决? JS鼠标移动触发事件 JS弹出框问题 js问题 appendChild(nodeArray[0][i])失败,什么原因? <a>标签问题 Firefox中javascript函数调用的问题! for语句应用,请您解答,谢谢。 js中的parent使用问题.如何把返回信息到另一个服务器上? 子窗口向父窗口传值的问题 <input type="text" id="TalkInTxt" /> 换行 页面搜索的javascript脚本
<HEAD>
<script language=javascript>
function fun_click()
{
alert(close!);
window.location.href="test.html?param=test";
}
</script>
</HEAD>
<BODY>
<INPUT TYPE="button" NAME="" value="Refresh" onclick="fun_click();">
</BODY>
</HTML>
window.onbeforeunload =function(){
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
{
alert("csdn某位blog里看到的,借用");
}
}
</script>
{
alert("关闭");
}
else
{
alert('刷新');
}
<script language="javascript">
function aaa(){
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
{
alert("Close!!!");
}
}
</script>
</body>