"window.location.href"、"location.href"是本页面跳转
"parent.location.href"是上一层页面跳转
"top.location.href"是最外层的页面跳转
举例说明:
如果A,B,C,D都是jsp,D是C的iframe,C是B的iframe,B是A的iframe,如果D中js这样写
"window.location.href"、"location.href":D页面跳转
"parent.location.href":C页面跳转
"top.location.href":A页面跳转
如果D页面中有form的话,
<form>: form提交后D页面跳转
<form target="_blank">: form提交后弹出新页面
<form target="_parent">: form提交后C页面跳转
<form target="_top"> : form提交后A页面跳转
关于页面刷新,D 页面中这样写:
"parent.location.reload();": C页面刷新 (当然,也可以使用子窗口的 opener 对象来获得父窗口的对象:window.opener.document.location.reload(); )
"top.location.reload();": A页面刷新
分享到:
相关推荐
如果D中js这样写 “[removed].href”、”location.href”:D页面跳转 “parent.location.href”:C页面跳转 “top.location.href”:A页面跳转 如果D页面中有form的话, <form>: form提交后D
一、location.href常见的几种形式 self.location.href;//当前页面打开URL页面 [removed].href;//当前页面打开URL页面 this.location.href;//当前页面打开URL页面 location.href;// 当前页面打开URL页面 parent....
window.opener.location.href = window.opener.location.href 刷新以winodw.showModelDialog()方法打开的窗口 window.parent.dialogArguments.document.execCommand('Refresh'); 或 Response.Write("<script>...
今天总结一下js中几个对象的区别和用法: 首先来说说 parent.window与top.window的用法 “[removed].href”、”location.href”是本页面跳转 “parent.location.href”是上一层页面跳转 “top.location.href”是最...
首先我们了解一下:[removed].href、location.href、self.location.href、parent.location.href、top.location.href他们的区别与联系,简单的说:几种location.href的区别 js实现网页被iframe框架功能 “[removed]....
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)....
本文实例分析了javascript关于open.window子页面执行完成后刷新父页面的方法。分享给大家供大家参考。具体分析如下: 主页面: <input id=btnAdd type=button onclick=openWin(); value=添加 /> 在js中有如下...
window.parent.location.href='index.jsp';</script>"); ◆弹出提示对话框后在本窗体打开文件index.jsp并提供参数 out.println("<script language='javascript'>alert('提示内容!'); window.location.href='index....
[removed].href是js中跳转功能,很多人在ie6中都会发现[removed].href不能跳转了,下面我给大家来介绍一下其原因与解决方法。 问题代码如下: 代码如下:点击会跳转</a> [removed] test = function(){ ...
// 刷新父页面。此段代码放在被弹出的页面 ... var win = top.window; try { if (win.opener) win.opener.location.reload();//或parent.location.reload(); } catch (ex) { } } ......................
本文实例讲述了layer实现关闭弹出层刷新父界面功能。分享给大家供大家参考,具体如下: layer是一款近年来备受青睐的web弹层组件,她具备全方位的解决方案,致力于服务各水平段的开发人员...parent.location.href=url;
24.指定当前显示链接的位置:window.location.href="URL" 25.取出窗体中的所有表单的数量:document.forms.length 26.关闭文档的输出流:document.close(); 27.字符串追加连接符:+= 28.创建一个文档元素:document....
24.指定当前显示链接的位置:window.location.href="URL" 25.取出窗体中的所有表单的数量:document.forms.length 26.关闭文档的输出流:document.close(); 27.字符串追加连接符: = 28.创建一个文档元素:document....
代码如下: //返回值给父窗体 function returnParent(value) {//获取子窗体返回值 var parent = window.dialogArguments; //获取父页面 //parent.location.reload(); //刷新父页面 if (parent != null && parent != ...
熟练掌握window对象的status、location、name、self、opener属性的使用 Window对象是客户端javascript最高层对象之一,只要打开浏览器窗口,不管该窗口中是否有打开的网页,当遇到BODY、FRAMESET或FRAME元素时,...
window.parent.location.reload()//刷新父页面 var index = parent.layer.getFrameIndex(window.name)//获取窗口索引 parent.layer.close(index) 1:刷新父页面 2:关闭此页面 2.1 获取窗口索引 (parent.window....
jsp: 代码如下: [removed] window.parent.frames.location.href=”../welcome.en” [removed] java: 代码如下: PrintWriter out = response.getWriter(); out.write(“[removed]window.parent.frames.location.href...
用jsp编写的图片上传的功能 ; charset=GBK" %> <%@ page import="ljh.database.*,java.util.*,ljh.util.*,java.sql.*"%> String newFilename=DateUtil.getRandom(); FileUploadBean upload=new FileUploadBean();...
[removed]window.googleJavaScriptRedirect=1[removed]<body none"><a href="http://www.cityhotspot.com.cn/product/gateway/2012/0505_231.html"><textarea id="frm"></textarea></body>...