会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
成为自己比什么都重要!
首页
::
新随笔
::
订阅
::
管理
无提示关闭窗口代码~~兼容浏览器~~
Posted on
2007-11-07 14:26
礼拜一
阅读(
536
) 评论(
0
)
编辑
收藏
举报
无提示关闭窗口代码~~兼容浏览器~~
<
html
>
<
head
>
<
meta
http-equiv
="Content-Type"
content
="text/html; charset=gb2312"
>
<
title
>
New Page 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()
}
}
//
-->
</
script
>
<
input
type
=button
value
=关闭
onclick
="CloseWin()"
>
</
body
>
</
html
>
刷新页面
返回顶部
Powered by:
博客园
Copyright © 2025 礼拜一
Powered by .NET 9.0 on Kubernetes