我一个HTML页面有2个框架,一个内的链接点击后,在另一个框架内响应,请问如何设置另一个框架的默认页面?
2个回答
展开全部
用JS来控制嘛,比如
<html >
<head>
<title>QQ空间</title>
<script type="text/javascript">
function pic1() {
document.getElementById("s").src="img/imges/12.jpg"
}
function pic2() {
document.getElementById("s").src = "img/imges/13.jpg"
}
function pic3() {
document.getElementById("s").src = "img/imges/15.jpg"
}
function pic4() {
document.getElementById("s").src = "img/imges/150K4A96-0.jpg"
}
function pic5() {
document.getElementById("s").src = "img/imges/150K45O0-3.jpg"
}
function pic6() {
document.getElementById("s").src = "img/imges/150K425A-6.jpg"
}
function pic7() {
document.getElementById("s").src = "img/imges/150K42345-5.jpg"
}
</script>
</head>
<body>
<div id="head">
<a href="#" onclick="pic1()" ><img alt="" class="style1" src="img/12.jpg" /></a>
<a href="#" onclick="pic2()"> <img alt="" class="style2" src="img/13.jpg" /></a>
<a href="#" onclick="pic3()"><img alt="" class="style3" src="img/15.jpg" /></a>
<a href="#" onclick="pic4()"><img alt="" class="style4" src="img/150K4A96-0.jpg" /></a>
<a href="#"onclick="pic5()"><img alt="" class="style5" src="img/150K45O0-3.jpg" /></a>
<a href="#"onclick="pic6()"><img alt="" class="style6" src="img/150K425A-6.jpg" /></a>
<a href="#" onclick="pic7()"><img alt="" class="style4" src="img/150K42345-5.jpg" /></a>
</div>
<div id="footer">
<img id="s" src="img/imges/12.jpg" alt="s"/>
</div>
</body>
</html>
<html >
<head>
<title>QQ空间</title>
<script type="text/javascript">
function pic1() {
document.getElementById("s").src="img/imges/12.jpg"
}
function pic2() {
document.getElementById("s").src = "img/imges/13.jpg"
}
function pic3() {
document.getElementById("s").src = "img/imges/15.jpg"
}
function pic4() {
document.getElementById("s").src = "img/imges/150K4A96-0.jpg"
}
function pic5() {
document.getElementById("s").src = "img/imges/150K45O0-3.jpg"
}
function pic6() {
document.getElementById("s").src = "img/imges/150K425A-6.jpg"
}
function pic7() {
document.getElementById("s").src = "img/imges/150K42345-5.jpg"
}
</script>
</head>
<body>
<div id="head">
<a href="#" onclick="pic1()" ><img alt="" class="style1" src="img/12.jpg" /></a>
<a href="#" onclick="pic2()"> <img alt="" class="style2" src="img/13.jpg" /></a>
<a href="#" onclick="pic3()"><img alt="" class="style3" src="img/15.jpg" /></a>
<a href="#" onclick="pic4()"><img alt="" class="style4" src="img/150K4A96-0.jpg" /></a>
<a href="#"onclick="pic5()"><img alt="" class="style5" src="img/150K45O0-3.jpg" /></a>
<a href="#"onclick="pic6()"><img alt="" class="style6" src="img/150K425A-6.jpg" /></a>
<a href="#" onclick="pic7()"><img alt="" class="style4" src="img/150K42345-5.jpg" /></a>
</div>
<div id="footer">
<img id="s" src="img/imges/12.jpg" alt="s"/>
</div>
</body>
</html>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询