转自:
http://www.cnblogs.com/binaryworms/archive/2010/04/07/1706481.html
打开者页面:(index.html)
<script type="text/javascript" >
function OpenDialog()
{
showModalDialog("dialog.html",window,"dialogWidth=700px;dialogHeight=400px;");
}
function Changing()
{
document.getElementById("god").value="能打开?";
}
</script>
<input type="button" id="god" value="打开" onclick="OpenDialog();" >
dialog.html 页面:
<iframe name="god" src="oprater.html" frameborder="0" height="400px" width="600px"></iframe>
oprater.html框架内的页面:
<script type="text/javascript" >
function grandParent()
{
parent.window.dialogArguments.Changing();
}
</script>
<input type="button" value="换原来的值" onclick="grandParent();" >
分享到:
相关推荐
主页面用window.showModalDialog的时候,如果直接打开其它系统的页面,这时候别人的页面在window.returnValue=1;这样返回值的时候,主页面是取不到返回值的,原因就是因为跨域了.
javascript中showModalDialog子页面值赋给父页面 并解析json格式的值
showModalDialog:被打开后就会始终保持输入焦点。除非对话框被关闭,否则用户无法切换到主窗 口。类似alert的运行效果。 showModelessDialog:被打开后,用户可以随机切换输入焦点。对主窗口没有任何影响(最多是被...
Selenium目前没有提供对IE模态对话框(即通过showModalDialog方法打开的弹出对话框)的处理。原因在于,模态对话框会将父页面的 JS挂起,直至对话框处理完毕才会继续执行父页面JS。因为Selenium的底层实现是基于JS的,...
This is a `window.showModalDialog()` shim using a modal HTML5 `<dialog>` element and ECMAScript 6 Generators. It was tested in the latest Google Chrome with the *Enable Experimental JavaScript* flag ...
针对window.showmodaldialog弹出窗体无刷新的详细使用
通过实例,详细说明了showModalDialog弹出网页窗口的应用。
解决三层或心上showModalDialog的问题_2
网上找了好几个小时没有找到解决办法。最终还是自己解决了。...这样做就是用超链接把返回url转递到用showModalDialog打开的新窗口中,当showModalDialog返回时指到转来的url,最终不刷新父窗口。......
解决三层或心上showModalDialog的问题_js
showModalDialog() (IE 4+ 支持) showModelessDialog() (IE 5+ 支持) window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框。 window.showModelessDialog()方法用来创建一个显示HTML内容的非模态...
div层实现showModalDialog
showModalDialog参数传递和获
在页面中使用了showModalDialog,但是在跳转链接时,不会在当前页执行,而是弹出一个新的页面。
showModalDialog和showModelessDialog使用心得
做项目时,碰到了前台页面需要向弹出框传值并且需要使用弹出框的返回值的需要,一开始使用的prompt...发现ie浏览器时,prompt()弹出框的位置会固定在左上角。后来使用window.showModalDialog(url,params,pos)方法 解决
模式打开窗体 父窗体接收并显示返回值 。。。。。。。
页面弹窗实现用的showModalDialog方法
使用window.showModalDialog的程序员都知道,该方法可返回值。但是如果遇到跨域时,就返回为underfine。本文档通过iframe镶嵌页面解决该问题。
showModalDialog刷新窗口的例子