当前位置: 首页 > 图文教程 > 网络安全 > 安全基础 > 完美关闭窗口JS

安全基础
网络安全讲座之九:审计结果(8)
Win 2000防毒从安装系统时开始
如何消除Oracle数据库的安全隐患(1)
如何消除Oracle数据库的安全隐患(2)
如何消除Oracle数据库的安全隐患(3)
修改注册表加强WIN2000安全
美国如何打造网络安全盾牌
2000中了灰鸽子木马清除
小心你的 ADSL猫被黑
网络安全防范的十个戒律
木马潜伏技巧大曝光
谈Google DeskTop的安全隐患
Windows下权限设置详解
无线入侵检测系统
使用Honeypots同Internet蠕虫作斗争
安全防护知识 :端口扫描技术全攻略
通过Windows组策略让网络更强壮
让溢出攻击远离我们
阻击无线游侠—802.11家族安全浅析
网上保障个人隐私信息的十个基本常识

安全基础 中的 完美关闭窗口JS


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-28   浏览: 106 ::
收藏到网摘: n/a

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<!--
by fason(2003-5-20)
-->
</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()
}
}
//-->
</script>
<input type=button value=关闭 onclick="CloseWin()">
</body>
</html>