这个是主页面(5.htm),包含4.htm和6.htm两个页面:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function test()
{
//这里是一个测试,你可以把地址改成你需要的页面地址,比如刷新原来的页面
//this.parent.fm4.fm2.location.href = "2.htm";
//this.parent.fm4.fm3.location.href = "3.htm";
this.parent.fm4.fm2.location.href = "http://www.csdn.net";
this.parent.fm4.fm3.location.href = "http://www.sina.com.cn";
}
</script>
</head><body>
<input type="button" value="刷新" onClick="test()">
</body>
</html>下面是6.htm的代码,控制刷新的代码在这个页面中:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function test()
{
//这里是一个测试,你可以把地址改成你需要的页面地址,比如刷新原来的页面
//this.parent.fm4.fm2.location.href = "2.htm";
//this.parent.fm4.fm3.location.href = "3.htm";
this.parent.fm4.fm2.location.href = "http://www.csdn.net";
this.parent.fm4.fm3.location.href = "http://www.sina.com.cn";
}
</script>
</head><body>
<input type="button" value="刷新" onClick="test()">
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function test()
{
//这里是一个测试,你可以把地址改成你需要的页面地址,比如刷新原来的页面
//this.parent.fm4.fm2.location.href = "2.htm";
//this.parent.fm4.fm3.location.href = "3.htm";
this.parent.fm4.fm2.location.href = "http://www.csdn.net";
this.parent.fm4.fm3.location.href = "http://www.sina.com.cn";
}
</script>
</head><body>
<input type="button" value="刷新" onClick="test()">
</body>
</html>下面是6.htm的代码,控制刷新的代码在这个页面中:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function test()
{
//这里是一个测试,你可以把地址改成你需要的页面地址,比如刷新原来的页面
//this.parent.fm4.fm2.location.href = "2.htm";
//this.parent.fm4.fm3.location.href = "3.htm";
this.parent.fm4.fm2.location.href = "http://www.csdn.net";
this.parent.fm4.fm3.location.href = "http://www.sina.com.cn";
}
</script>
</head><body>
<input type="button" value="刷新" onClick="test()">
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><frameset rows="*,*">
<frame src="2.htm" name="fm2">
<frame src="3.htm" name="fm3">
</frameset><noframes></noframes>
</html>子页面2.htm和3.htm的代码(这里是测试用的,你自己写的时候用自己的页面就行):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><body>
</body>
</html>
<script language="javascript">
function test()
{
//这里是一个测试,你可以把地址改成你需要的页面地址,比如刷新原来的页面
//this.parent.fm4.fm2.location.href = "2.htm";
//this.parent.fm4.fm3.location.href = "3.htm";
this.parent.fm4.fm2.location.href = "http://www.csdn.net";
this.parent.fm4.fm3.location.href = "http://www.sina.com.cn";
}
</script>
提供你思路:县通过 脚本函数找到那个frame然后再给frame得innerhtml 负值使其刷新