你要什么效果
点击这个连接,然后在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";

解决方案 »

  1.   

    topFrame代码:
    <A HREF="1.htm" id="test">1</A> 其它Frame代码:<a href="#" onclick="location.href=topFrame.document.all.test">点我</a>
      

  2.   

    var oA = document.createElement('a');
    oA.href='1.htm';
    oA.target='leftFrame';
    oA.innerHTML = '1';
    document.body.appendChild(oA);
      

  3.   

    var oA = document.createElement('a');
    oA.href='1.htm';
    oA.target='leftFrame';
    oA.appendChild(document.createTextNode('1'));
    document.body.appendChild(oA);
      

  4.   

    document.topFrame.location.href = "1.htm";
      

  5.   

    应该是这个`~~
    在topFrame也面里
    parent.document.leftFrame.location.href = "1.htm";
      

  6.   

    不行呀,出错,说
    leftFrame.location 为空或不是对象
      

  7.   

    <frameset cols="200,*">
    <frame src="1.htm" >
    <frame id="f2">////////
    1.htm
    <a onclick="parent.document.getElementbyId('f2').src="http://www.163.com"> 链接
      

  8.   

    主要语句是这个
    window.open( "1.htm", "leftFrame" )