<INPUT type="button" value="Button" οnclick="javascript:window.frames['testFrm'].window.document.getElementById('txtName').value='XXX';"></td>
a中的 frame 为<iframe id="testFrm" frameborder="0" height="200" width="100%" marginheight="0" marginwidth="0"
scrolling="no" src="b.jsp"></iframe>
b中有个<INPUT id="txtName" type="text"> textbox控件
点击a中的按钮b中的textbox的值即为XXX
a中的 frame 为<iframe id="testFrm" frameborder="0" height="200" width="100%" marginheight="0" marginwidth="0"
scrolling="no" src="b.jsp"></iframe>
b中有个<INPUT id="txtName" type="text"> textbox控件
点击a中的按钮b中的textbox的值即为XXX