如题所述
第1个回答 2017-07-07
分别列出三个文件的内容如下:
(1) frame.html
<frameset rows="30%, 70%">
<frame name="topframe" src="top.html">
<frameset cols="40%, 60%">
<frame src="left.html">
<frame src="main.html">
</frameset>
</frameset>
(2) top.html
<input type="text" value="abc" id="abc">
(3) main.html
<input type="button" onclick="changeValue();">
<script>
function changeValue(){
parent.topframe.abc.value='I have be changed!!!';
}
</script>本回答被提问者采纳
(1) frame.html
<frameset rows="30%, 70%">
<frame name="topframe" src="top.html">
<frameset cols="40%, 60%">
<frame src="left.html">
<frame src="main.html">
</frameset>
</frameset>
(2) top.html
<input type="text" value="abc" id="abc">
(3) main.html
<input type="button" onclick="changeValue();">
<script>
function changeValue(){
parent.topframe.abc.value='I have be changed!!!';
}
</script>本回答被提问者采纳