你要什么效果
点击这个连接,然后在topFrame框里打开?
<a id="aa">aaa</a>
js:
document.getElementById("aa").target = "topFrame";
docuemnt.getElementById("aa").href = "1.htm";还是不点连接,直接用js?
document.topFrame.location.href = "1.htm";
点击这个连接,然后在topFrame框里打开?
<a id="aa">aaa</a>
js:
document.getElementById("aa").target = "topFrame";
docuemnt.getElementById("aa").href = "1.htm";还是不点连接,直接用js?
document.topFrame.location.href = "1.htm";
<A HREF="1.htm" id="test">1</A> 其它Frame代码:<a href="#" onclick="location.href=topFrame.document.all.test">点我</a>
oA.href='1.htm';
oA.target='leftFrame';
oA.innerHTML = '1';
document.body.appendChild(oA);
oA.href='1.htm';
oA.target='leftFrame';
oA.appendChild(document.createTextNode('1'));
document.body.appendChild(oA);
在topFrame也面里
parent.document.leftFrame.location.href = "1.htm";
leftFrame.location 为空或不是对象
<frame src="1.htm" >
<frame id="f2">////////
1.htm
<a onclick="parent.document.getElementbyId('f2').src="http://www.163.com"> 链接
window.open( "1.htm", "leftFrame" )