如何可以关闭一个页面,不用提示是否关闭那?

kingljx 2002-05-17 11:51:19
window.close()他总是提示
...全文
50 点赞 收藏 21
写回复
21 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
303 2002-05-17
ChinaOK(授人以鱼,不如授人以渔)说的对
其实你是不用来提问的,只在搜一下,就可以查到的。^_^
回复
funboy88 2002-05-17
关闭的时候不弹出窗口提示,
你只要把窗口的所有工具条和状态栏什么玩意全去掉,用JS可以实现,应该知道吧,这样你再用WINDOW。CLOSE的时候,就不会跳出那个烦人的确定啦
回复
ChinaOk 2002-05-17
<head>
<OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Close">
</object>
</head>
<body>
<input type="button" value="点击我关闭窗口" onclick="closes.Click();">
</body>

回复
kingljx 2002-05-17
晕倒,那有什么办法可以让第一个页面控制工具栏吗?
回复
lovingkiss 2002-05-17
第一个主页面就是这样,如果
Window.Open之后呢,就不会了;第一个页面这个问题是去不掉的
回复
WalkSing 2002-05-17
<%
sub jump(url)
if instr(url,"|")>0 then
url_a=split(url,"|")
url_t=url_a(1)
url_lnk=url_a(0)
else
url_t=0
url_lnk=url
end if
tmp="<meta http-equiv=""refresh"" content="""&url_t&";url="&url_lnk&""">"
response.write tmp
response.end
end sub
%>
//autoclose.asp
<html>
<head><title>Time Auto CloseIE</title>
</head>
<SCRIPT language='JavaScript'>
function show(para_URL,targ)
{
var URL=new String (para_URL);
window.open(URL,targ,'status=yes,scrollbars=yes,width=550,height=500');
URL = null;
}

function Unload()
{
window.close(1);
}
</SCRIPT>
</head>
<body onLoad='Unload()'>

</body>
</html>

回复
lovingkiss 2002-05-17
<OBJECT id=closes1 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Minimize">
</object>

<OBJECT id=closes2 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Close">
</object>

<OBJECT id=closes3 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Maximize">
</object>

<OBJECT id=closes4 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Restore">
</object>
</head>

<body>
<Script Language=Vbscript>
'closes1.HHClick '成功
closes2.HHClick '成功
'closes3.HHClick '成功
'closes4.HHClick '失败了,这一个
</Script>
回复
lovingkiss 2002-05-17
<OBJECT id=closes1 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Minimize">
</object>

<OBJECT id=closes2 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Close">
</object>

<OBJECT id=closes3 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Maximize">
</object>

<OBJECT id=closes4 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Restore">
</object>
</head>

<body>
<Script Language=Vbscript>

'closes1.HHClick '成功
'closes2.HHClick '成功
'closes3.HHClick '成功
'closes4.HHClick '失败——是不是你的参数错了呢?
</Script>
回复
lovingkiss 2002-05-17
<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>关闭窗口</title>

<OBJECT id=closes1 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Minimize">
</object>

<OBJECT id=closes2 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Close">
</object>

<OBJECT id=closes3 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Maximize">
</object>

<OBJECT id=closes4 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Restore">
</object>
</head>

<body>
<Script Language=Vbscript>
'closes1.HHClick '成功
'closes2.HHClick '成功
'closes3.HHClick '成功
'closes4.HHClick '失败,——可能这个参数不对,你看一看
</Script>
</body>
</html>
回复
ChinaOk 2002-05-17
你用vbs搞定了
怎么写的?帖来看看。
回复
ChinaOk 2002-05-17
都应该有的。不知道如何改成vbs
因为VBSCRIPT里也有一个同名的CLOSE方法。
而OBJECT的那个CLOSE方法是不能改的。
用js挺好
回复
lovingkiss 2002-05-17
Restore那一个不好用,保存的时候就替是错误;
回复
lovingkiss 2002-05-17
正常的应该可以使用和转换的呀;

ChinaOK,这个Object,是不是客户端都有啊??可别有的用户没有,那可就糟糕了阿
回复
ChinaOk 2002-05-17
微软有如下说明:

Comments
If you are using Microsoft Visual Basic Scripting Edition (VBScript), always use HHClick, which provides the same functionality as Click, but prevents a naming conflict with the VBScript Click method.
回复
netnice 2002-05-17
隔3
回复
ChinaOk 2002-05-17
不知道为什么vbs不行。微软的例子里也使用的javascript
回复
ChinaOk 2002-05-17
http://msdn.microsoft.com/library/en-us/htmlhelp/html/vsconOcxintro.asp
回复
ChinaOk 2002-05-17
<OBJECT id=closew type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Minimize">
</object>
最小化窗口
<OBJECT id=closew type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Maximize">
</object>
最大化窗口
<OBJECT id=closew type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Restore">
</object>
还原窗口


回复
lovingkiss 2002-05-17
1、这段代码是什么一个Object,还有什么功能?
2、怎么改成Vbscript,我比较习惯用VBScript了;我改了,可是不提示出错,但是也不好用
<Script Language=Vbscript>
closes.Click()
</Script>
回复
lovingkiss 2002-05-17
<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>关闭窗口</title>
<OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Close">
</object>
</head>
<body>
....你需要的代码
<Script Language=javascript>
closes.Click();
</Script>
</body>
</html>
ChinaOK(授人以鱼,不如授人以渔),借用了你的代码,不过为什么改编成了Vbscript的就不好用了呢?
回复
加载更多回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2002-05-17 11:51
社区公告
暂无公告