父页面与子页面之间传值
如果在页面中不涉及到第三方的插件(比如:artDialog),可以用如下的方式打开子页面
window.open(...)子页面中获取父页面对象:window.openerwindow.showModalDialog(..)子页面中获取父页面对象:window.dialogargument
1、设置值:window.opener.document.getElementById("txtID").value=document.getElementById("t").value;2、调用方法:window.opener.parentFunctionName(arg0);3、关闭父窗口:window.opener.close();opener=null;4、刷新父页面window.opener.location=window.opener.location;5、获取值window.opener.document.getElementById('txtID').value;1、设置值:window.dialogArguments.document.getElementById("txtID").value=document.getElementById("t").value;2、调用方法:window.dialogArguments.parentFunctionName(arg0);3、关闭父窗口:window.dialogArguments.close();opener=null;4、刷新父页面window.dialogArguments.location=window.dialogArguments.location;5、获取值window.dialogArguments.document.getElementById('txtID').value;