1.htm
<script>
window.open("123.htm");
</script>
<body>
<input type=text id=txt1>
先不要关闭我
</body>
//////////////////////////////////////////////
123.htm:
<iframe src='about:<input type=button value=button
onclick=parent.opener.document.getElementById("txt1").value="wssgwps">'
></iframe>
<script>
window.open("123.htm");
</script>
<body>
<input type=text id=txt1>
先不要关闭我
</body>
//////////////////////////////////////////////
123.htm:
<iframe src='about:<input type=button value=button
onclick=parent.opener.document.getElementById("txt1").value="wssgwps">'
></iframe>
1.htm:
<script>
window.open("2.htm");
</script>
<body>
<input type=text id=txt1 value=wssgwps>
<input type=text id=txt2 value=spwgssw>
先不要关闭我
</body>
2.htm:
<iframe src='3.htm'></iframe>
3.htm:
<script>
function getId()
{
//获得ID为txt1的文本框对象句柄
var Id1 = parent.opener.document.getElementById("txt1");
//获得ID为txt2的文本框对象句柄
var Id2 = parent.opener.document.getElementById("txt2");
//也可以对对象施加其它动作
alert(Id1.value);
alert(Id2.value);
}
</script>
<input type=button value=clickMe onclick='getId()'>