求助:父页面,怎么获取子页面的值

chenhongxin 2010-05-24 09:30:46
一个页面,弹出另一个页面。
父页面,怎么获取子页面的值。子页面,又怎么读取父页面的值。高手帮忙 了。。。。。
...全文
183 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wdbjsh 2010-05-24
  • 打赏
  • 举报
回复
父页面

var sonWin=window.open('aaa.html','bbbb');
alert(sonWin.document.body.innerHTML);

子页面

var parentWin=window.opener;
alert(parentWin.document.body.innerHTML);
chenhongxin 2010-05-24
  • 打赏
  • 举报
回复
有简单例子没有,最好写一个,谢谢了。。
hhwydwfg 2010-05-24
  • 打赏
  • 举报
回复

vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures])


window.showModalDialog("showModalDialog_target.htm", "",
sFeatures
孟子E章 2010-05-24
  • 打赏
  • 举报
回复
window.open
还是
window.showModalDialog
方法?
前者使用opener 对象,后者采用
showModalDialog("url",window)
进行传递窗口对象
孟子E章 2010-05-24
  • 打赏
  • 举报
回复
例子+教程
http://blog.csdn.net/net_lover/archive/2002/09/24/6910.aspx

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧