81,092
社区成员
发帖
与我相关
我的任务
分享
this is a.htm
<input id="txt_a" value="I'm in the a.htm" />
<input type="button" value="openB" onclick="openB()" />
<script type="text/javascript">
function openB() {
showModalDialog('b.htm', window); // 关键是这里把window句柄传过去
}
</script>
this is b.htm
<iframe src="c.htm" name="page" width="100%" height="100%"></iframe>
this is c.htm
<script type="text/javascript">
window.onload = function () {
alert(dialogArguments.document.getElementById('txt_a').value);
}
</script>