易截截图软件、单文件、免安装、纯绿色、仅160KB

Javascript 刷新框架及页面的方法总集

 先来看一个简单的例子:
下面以三个页面分别命名为frame.html、top.html、bottom.html为例来具体说明如何做。
frame.html 由上(top.html)下(bottom.html)两个页面组成,代码如下:
<!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>
下面是bottom.html页面源代


相关文档:

Google 排名中的 10 个最著名的 JavaScript 库

ugmbbc发布于 2009-11-14 09:41:43| 7628 次阅读 字体:大 小 打印预览
var ReTitle = '回复:Google 排名中的 10 个最著名的 JavaScript 库';
感谢COMSHARP CMS的投递
新闻来源:tripwiremagazine.com
JavaScript 是 Web 开发与设计中不可或缺的东西,不管是一个简单的网页还是一个专业的站点,也不管你是高手还是菜鸟 ......

javascript节点操作DOMDocument属性和方法

 http://www.xker.com/page/e2008/0807/55407.html
最近发现DOMDocument对象很重要,还有XMLHTTP也很重要
注意大小写一定不能弄错.
属性:
1Attributes 存储节点的属性列表(只读)
2childNodes 存储节点的子节点列表(只读)
3dataType 返回此节点的数据类型
4Definition 以DTD或XML模式给出的节点的定义(只读 ......

服务器端javascript弹出对话框和文件、目录操作

//服务器弹出对话框
 if (lcSID == "1" && (txtNsp.Text.Trim() != lcNewspaper || Convert.ToDateTime(txtNspdate.Text.Trim()) != Convert.ToDateTime(lcNspdate)))
        {
            string lcJs = "v ......

Javascript跨域访问解决方案【转帖】

由于安全方面的考虑,Javascript被限制了跨域访问的能力,但是有时候我们希望能够做一些合理的跨域访问的事情,那么怎么办呢?
这里分两类情况:
一、基于同一父域的子域之间页面的访问;参见如下3个domain域:taobao.com、jipiao.taobao.com、promotion.taobao.com;它们有相同的父域taobao.com。
二、基于不同父域页面 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号