-- a.htm ---
<a href="p1.htm" class="submenu" target="frm">p1</a>
<a href="p2.htm" class="submenu" target="frm">p2</a>
<a href="p3.htm" class="submenu" target="frm">p3</a>
<iframe name="frm" scrolling="no" width="100%" height="100%" src="p1.htm">
</iframe>-- b.htm ---
在b.htm中,可实现跳转到a.htm并指定iframe某一个连接。(例如:p3.htm)
<a href="p1.htm" class="submenu" target="frm">p1</a>
<a href="p2.htm" class="submenu" target="frm">p2</a>
<a href="p3.htm" class="submenu" target="frm">p3</a>
<iframe name="frm" scrolling="no" width="100%" height="100%" src="p1.htm">
</iframe>-- b.htm ---
在b.htm中,可实现跳转到a.htm并指定iframe某一个连接。(例如:p3.htm)
解决方案 »
- 我被jquery搞晕了,求助啊!
- 谁来看看怎么回事,关于javascript的,求改进,去重复
- 简繁体转换的JS,不兼容FF,高手看一下怎么才能兼容!
- 把子符串中的某个相同字串替换成另一个字串或字母
- ¥¥¥ 如何修改HTML中的XML串
- javascript简单问题!!!!
- 如何在正则表达式中使用变量?
- 能否动态改变一个窗口的statusbar,menubar,toolbar属性,即可以动态设置显示、隐藏工具条等。
- 急! 关于同元素命名! 在线等!
- ****** net_lover, please come in (about textarea)
- 关于IE8版本号的判断
- 一道JAVASCRIPT题目
在a页面接受,
然后那个iframe 就用 document.write 输出吧
<HTML>
<head>
<script>
function ss(url){
document.getElementById('ll').src = url;
}
</script>
</head>
<BODY>
<a href="#" class="submenu" onClick="ss('http://www.sina.com')">sina </a>
<a href="#" class="submenu" onClick="ss('http://www.baidu.com')">baidu </a>
<a href="#" class="submenu" onClick="ss('http://www.google.com')">google</a>
<iframe id='ll' name="frm" scrolling="no" width="100%" height="100%" src="http://www.baidu.com">
</iframe> </BODY></HTML>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>p1 p2 p3</title>
<script>
window.onload = function (){
var url = unescape(window.location.href);
document.getElementsByName("frm")[0].src = url.split("?")[1].split("=")[1];}
</script>
</head><body>
<a href="p1.htm" class="submenu" target="frm">p1 </a>
<a href="p2.htm" class="submenu" target="frm">p2 </a>
<a href="p3.htm" class="submenu" target="frm">p3 </a>
<iframe name="frm" scrolling="no" width="100%" height="100%" src="p1.htm">
</iframe>
</body></html>
b.htm
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>b</title>
<script>
function go(){
var str = "a.htm?h=http://www.baidu.com";
window.location.href = escape(str);
}
</script>
</head><body>
<input type=button value="Go A" onclick="go()">
</body></html>