opener
opener用于在window.open的页面引用执行该window.open方法的的页面的对象。例如:A页面通过window.open()方法弹出了B页面,在B页面中就可以通过opener来引用A页面,这样就可以通过这个对象来对A页面进行操作。
parent
parent用于在iframe,frame中生成的子页面中访问父页面的对象。例如:A页面中有一个iframe或frame,那么iframe或frame中的页面就可以通过parent对象来引用A页面中的对象。这样就可以获取或返回值到A页面中。
parent指父窗口,在FRAMESET中,FRAME的PARENT就是FRAMESET窗口。 opener指用WINDOW.OPEN等方式创建的新窗口对应的原窗口。 两者肯定不一样。
parent是相对于框架来说父窗口对象 opener是针对于用window.open打开的窗口来说的父窗口,前提是window.open打开的才有。
参考资料: js中parent和opener的区别 http://www.studyofnet.com/news/262.html
相关推荐
不同方式跨域弹出窗口区别 1> window.showModalDialog()采用JS原理实现,同时父窗口不可操作,window.open()采用新创建一个窗口,同时父窗口可操作; 2> 父窗口与子窗口传递值的方式也有所不同,在子窗口中操作父...
NULL 博文链接:https://ruanjiangjx.iteye.com/blog/792143
本篇文章主要是对js中opener与parent的区别进行了详细的介绍,需要的朋友可以过来参考下,希望对大家有所帮助
js中opener与parent的区别详细解析.docx
本文为大家介绍下JS window对象的top、parent、opener含义,不了解的朋友可以参考下,希望对大家有所帮助
5 parent和opener的区别 6 $ document ready和window onload的区别 7 css如何清除浮动 8 SqlTransaction事务的用法 9 extjs中apply和applyIf 10 asp net如何在后台输出js脚本">1 char nchar varchar nvarchar类型...
window.opener 的用法 window.opener 返回的是创建当前窗口的那个窗口的引用,比如点击了a.htm上的一个链接而打开了b.htm,然后我们打算在b.htm上输入一个值然后赋予a.htm上的一个id为“name”的... opener.parent
谷歌浏览器的一个新特点——关于获取iframe的parent对象Demo.zip,欢迎下载!!!
某页面中button按钮事件写代码如下: string Str1=... Response.Write("<script>window.open('" + Str1 + "','_blank');...</script>"); ...<body onload="window.parent.opener=null;window.close();"> </html>
本文实例分析了javascript关于open.window子页面执行完成后刷新父页面的方法。分享给大家供大家参考。具体分析如下: 主页面: <input id=btnAdd type=button onclick=openWin(); value=添加 />...
} setTimeout : 延迟多长时间执行什么方法,具体使用://www.jb51.net/article/35535.htm opener: 指parent表示父窗口,比如一个A页面利用iframe或frame调用B页面,那么A页面所在窗口就是B页面的parent。...
(“#父窗口元素ID”,window.parent.document); 对应javascript版本为window.parent.document.getElementByIdx_x(“父窗口元素ID”);取父窗口的元素方法:$(selector, ...$(selector, window.opener.document);$(s
用iframe、弹出子页面刷新父页面 ...刷新父页和本页面: Response.Write("<script>alert('提交成功!');window.location.href=window.location.href;window.opener.location=window.opener.location;</script>");
js操作frame详细解说,window.opener和window.parent的区别 frame框架里的页面要改其他同框架下的页面或父框架的页面就用parent window.opener引用的是window.open打开的页面的父页面。 window.frames对象可以引用...
代码如下: //返回值给父窗体 function returnParent(value) {//获取子窗体返回值 var parent = window.dialogArguments;... //关闭子页面 } //window.opener.document.getElementById(“ActivityPic”);
var values = window.parent.opener.document.getElementById(id + “txt_dept_name”).value; var keys = window.parent.opener.document.getElementById(id + “hf_ids”).value; var ary = checkid.value.split...