本文介绍了我有几页来到主页的框架,其中一个改变了主页的颜色。什么身体请回答我?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
主页是:
main page is :
<html>
<head>
<title>Turnshop Corp.</title>
</head>
<frameset rows="150,*,100" border="1" >
<frame name="banner" scrolling="no" src="banner.html" >
<frameset cols="10%,*,10%" border="0">
<frame name="frame1" >
<frame name="main" src="image.html" >
<frame name="changcolor" src="changcolor.html" >
</frameset>
<frame name="frame2" >
<noframes>
<body >
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
更改颜色是:
change color is:
<html >
<head>
<title></title>
<script >
function check(color1) {
document.bgColor = color1;
}
</script>
</head>
<body >
<form name="form1" scrolling="no" >
Which is your favorite color for home page?
<br />
<input type="radio" name="color" onclick="check(this.value)" value="Aqua" />Aqua<br />
<input type="radio" name="color" onclick="check(this.value)" value="Blue" />Blue<br />
<input type="radio" name="color" onclick="check(this.value)" value="GoldenRod" />GoldenRod<br />
<input type="radio" name="color" onclick="check(this.value)" value="HotPink" />HotPink<br />
<input type="radio" name="color" onclick="check(this.value)" value="Fuchsia" />Fuchsia<br />
<input type="radio" name="color" onclick="check(this.value)" value="Coral" />Coral<br />
</form>
</body>
</html>
推荐答案
parent.banner.document.bgColor = p;
parent.frame1.document.bgColor = p;
parent.frame2.document.bgColor = p;
parent.changcolor.document.bgColor = p;
parent.main.document.bgColor = p;
注意:框架和框架集已经过时,请尝试更改页面设计,如果可能。它将更灵活,易于操作和处理。
问候,
Sujay Chakraborty
NOTE: Frames and Frameset are obsolete, try changing page design if possible. Its will be more flexible and easy to manipulate and handle.
Regards,
Sujay Chakraborty
这篇关于我有几页来到主页的框架,其中一个改变了主页的颜色。什么身体请回答我?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!