分类: 系统运维
2008-04-07 15:16:01
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> frame TITLE>
HEAD>
<frameset rows="50%,50%">
<frame name=top src="top.html">
<frame name=bottom src="bottom.html">
frameset>
HTML>现在假设top.html (即上面的页面) 有七个button来实现对bottom.html (即下面的页面) 的刷新,可以用以下七种语句,哪个好用自己看着办了。
语句1. window.parent.frames[1].location.reload();
语句2. window.parent.frames.bottom.location.reload();
语句3. window.parent.frames["bottom"].location.reload();
语句4. window.parent.frames.item(1).location.reload();
语句5. window.parent.frames.item('bottom').location.reload();
语句6. window.parent.bottom.location.reload();
语句7. window.parent['bottom'].location.reload();
top.html 页面的代码如下:
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> top.html TITLE>
HEAD>
<BODY>
<input type=button value="刷新1" onclick="window.parent.frames[1].location.reload()"><br>
<input type=button value="刷新2" onclick="window.parent.frames.bottom.location.reload()"><br>
<input type=button value="刷新3" onclick="window.parent.frames['bottom'].location.reload()"><br>
<input type=button value="刷新4" onclick="window.parent.frames.item(1).location.reload()"><br>
<input type=button value="刷新5" onclick="window.parent.frames.item('bottom').location.reload()"><br>
<input type=button value="刷新6" onclick="window.parent.bottom.location.reload()"><br>
<input type=button value="刷新7" onclick="window.parent['bottom'].location.reload()"><br>
BODY>
HTML>
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> bottom.html TITLE>
HEAD>
<BODY onload="alert('我被加载了!')">
<h1>This is the content in bottom.html.h1>
BODY>
HTML>
自动刷新页面的方法:
1.页面自动刷新:把如下代码加入
2.页面自动跳转:把如下代码加入
区域中3.页面自动刷新js版
ASP.NET如何输出刷新父窗口脚本语句
1. this.response.write("");
2. this.response.write("");
3. Response.Write("")
JS刷新框架的脚本语句
//如何刷新包含该框架的页面用
//子窗口刷新父窗口
( 或 刷新 )
//如何刷新另一个框架的页面用
如果想关闭窗口时刷新或者想开窗时刷新的话,在中调用以下语句即可。
开窗时刷新
关闭时刷新