<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script language="javascript">
// left 和 main 分别是框架的名称或者是ID
//方法一:
function openwindow(){
window.open("Default4.aspx","left");
window.open("Default3.aspx","main");
}
//方法二:
function openwindows(top,bottom){
parent.document.all.left.src = top;
parent.document.all.main.src = bottom;
}
</script>
</head>
<body>
<a href="#" onclick="openwindow();">open</a>
<p><a href="#" onclick="openwindows('Default4.aspx','Default3.aspx')">left</a></p>
</body>
</html>
框架页中点击一个超链接打开多个页面
本文介绍了一种利用JavaScript实现的页面加载方式,通过调用window.open方法或修改父级元素的源链接来实现在特定框架中加载不同页面的功能。这种方法适用于多框架网页布局,能够有效地分离导航与内容区域。

被折叠的 条评论
为什么被折叠?



