100分求IE關閉時提示是否退出的解決方案﹗ <body onbeforeunload="return('确定要退出吗?');"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language=javascript>window.onbeforeunload = function(){ if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) { return "别走嘛~!~!~!~!"; }}</script> <body onunload="if (confirm('确定要退出吗?')) {//选择了退出!);}else{//选择了不退出!);}"></body> <script language=javascript>function window.onbeforeunload(){if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){ window.event.returnValue="确定要退出本页吗?";}</script> 可不可以出现一个confirm框呢?Google的gmail就这样的——一个confirm对话框 兄弟,IE6.0很容易作到,但是IE5好象不好做到的! 昨天才看到地,希望对你有用:)<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>新建网页 1</title></head><body><script language="JavaScript"><!--function CloseWin(){ var ua=navigator.userAgent var ie=navigator.appName=="Microsoft Internet Explorer"?true:false if(ie) { var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE ")))) if(IEversion< 5.5) { var str = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">' str += '<param name="Command" value="Close"></object>'; document.body.insertAdjacentHTML("beforeEnd", str); document.all.noTipClose.Click(); } else { window.opener =null; window.close(); } } else { window.close() }}function queclose(){ if(confirm("你确定关闭吗?")) CloseWin();}//--></script><input type="button" onclick="queclose()" value="关闭"></body></html> google maps api v3版 画路径时加载数据越来越慢 关于对象自面量json 这是为何??? jquery当中算术运算问题 JavaScript 如何嵌入一张网页为其初始化变量? 当文本框的值改变了且不失去焦点会触发什么事件。 我想让连接在新的窗口打开,应该怎么改呢~? 请教一个棘手的问题 急问!关于获取框架内的对象? navigator.cookenabled能否准确判断浏览器是否接受cookie? 谁能告诉我parseInt("08")等于几 在层中有一个SELECT对象,当单击下拉按钮的时候,显示层中的下拉框,应该如何设置?
window.onbeforeunload = function()
{
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
{
return "别走嘛~!~!~!~!";
}
}
</script>
</body>
function window.onbeforeunload()
{
if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
window.event.returnValue="确定要退出本页吗?";
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head><body><script language="JavaScript">
<!--
function CloseWin()
{
var ua=navigator.userAgent
var ie=navigator.appName=="Microsoft Internet Explorer"?true:false
if(ie)
{
var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE "))))
if(IEversion< 5.5)
{
var str = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">'
str += '<param name="Command" value="Close"></object>';
document.body.insertAdjacentHTML("beforeEnd", str);
document.all.noTipClose.Click();
}
else
{
window.opener =null;
window.close();
}
}
else
{
window.close()
}
}
function queclose()
{
if(confirm("你确定关闭吗?"))
CloseWin();
}
//-->
</script>
<input type="button" onclick="queclose()" value="关闭">
</body>
</html>