我在弹出层中嵌套了一个iframe, iframe中的这个页面里面有一个 js 文件, 文件里面有这样一条语句 window.returnValue = 'XXX';
在iframe 的父页面中, 我已经重写的 window.showModaldialog() 方法 和window.close() 方法.我知道 在正常的情况下 var returnValue = winow.showModaldialog(URL,window,'xxxxxx'); 当弹出框被关闭 之前 window.returnValue = 'xxxx'; 当弹出关闭之后就 returnValue就会得到被返回的值,任何在执行下面的其他语句.
我现在需要的就是A页面中嵌套在iframe B页面 虽然设置了window.returnValue = 'xxxx', 但是我么有用系统的 window.close()方法, 所有怎么 才能在 A页面获取 window.returnValue的值;urljswindowreturnValue
在iframe 的父页面中, 我已经重写的 window.showModaldialog() 方法 和window.close() 方法.我知道 在正常的情况下 var returnValue = winow.showModaldialog(URL,window,'xxxxxx'); 当弹出框被关闭 之前 window.returnValue = 'xxxx'; 当弹出关闭之后就 returnValue就会得到被返回的值,任何在执行下面的其他语句.
我现在需要的就是A页面中嵌套在iframe B页面 虽然设置了window.returnValue = 'xxxx', 但是我么有用系统的 window.close()方法, 所有怎么 才能在 A页面获取 window.returnValue的值;urljswindowreturnValue
你的意思是在 A页面 定义一个 returnValue;
你的意思是在 A页面 定义一个 returnValue;
B页面中写 parent.returnValue = 'xxxx' 等于 A页面 window.returnValue = 'xxxx'
你的意思是在 A页面 定义一个 returnValue;
B页面中写 parent.returnValue = 'xxxx' 等于 A页面 window.returnValue = 'xxxx'
不是两个页面都设置, 是B 设值 A 获取
B parent.returnValue = 'xxxx' 就是 只设置 A页面的 returnValue
当然 B页面中写 parent.returnValue = 'xxxx', 在A页面中 直接 alert( returnValue) 就可以取到