如何改变不同frame中的页面背景景色?(100分求教)

大侠们支招啊
---------------------------------------------------------------

window.frames['frameName'].document.body.bgColor='#3366cc'
---------------------------------------------------------------

我是这样做的:

mainframe.htm代码:

1<frameset cols="50%,50%">
2<frame id="a" src="1.htm"/>
3<frame id="b" src="2.htm"/>
4</frameset>

1.htm代码:

1<a href="#" onclick="top.frames['b'].document.body.style.backgroundColor='green';">Text</a>

2.htm代码:无所谓

Published At
Categories with Web编程
Tagged with
comments powered by Disqus