87,910
社区成员
发帖
与我相关
我的任务
分享
<!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=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
window.onload = function () {
if(/\?u=(.+)/.test(location.href)){
alert(RegExp.$1);
document.getElementById("right").src = RegExp.$1;
}
}
</script>
</head>
<frameset cols="20%,*">
<frame src="left.html" name="left"/>
<frame src="" name="right" id="right"/>
</frameset>
<body>
</body>
</html>
right.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=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
if(window===window.top)
location.href = "main.html?u="+location.href;
</script>
</head>
<body>
右侧页面
</body>
</html>