index.html:

javascript操作frame 程序代码
<frameset  rows="200,*" cols="*" frameborder="yes" border="1" framespacing="1"  >
    <frame src="up.html" />
</frameset>


up.html:
javascript操作frame 程序代码
<input type="text" ).value=obj;
}
//-->
</SCRIPT>


down.html:
javascript操作frame 程序代码
<SCRIPT LANGUAGE="JavaScript">
<!--
function abc(obj)
{
var frm = window.parent.window.frames['topFrame'];
frm.cssrain(obj); //
}
//-->
</SCRIPT>
<input type="checkbox" name="check" value="1" onclick="abc(this.value)">1
<input type="checkbox" name="check" value="2" onclick="abc(this.value)">2
<input type="checkbox" name="check" value="3" onclick="abc(this.value)">3
<input type="checkbox" name="check" value="4" onclick="abc(this.value)">4
<input type="checkbox" name="check" value="5" onclick="parent.topFrame.cssrain(this.value)">5



总结:
访问frame或iframe对象时候
在ie中可以通过frame的id或name来访问,但在firefox中只能用frame的name来访问.

相关文章:

  • 2022-02-11
  • 2021-11-14
  • 2021-08-13
  • 2021-10-20
  • 2021-06-20
猜你喜欢
  • 2021-09-22
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案