刚才写错了:
2,由于“目的地址”是变量(要获取页面的数据),所以不能直接用 <a href="目的地址" target=_parent>词典 </a>实现 

解决方案 »

  1.   

    _top.location.href="目的地址" ;  
      

  2.   

    直接写变量就行了
    <a href="#" onClick="this.href='目的地址'" target="_parent">词典 </a>
      

  3.   

    <iframe width="200" height="300" src="aa.html"> </iframe>把这个命个名,加个ID<iframe id="indexFrame" ...></iframe><script language="javascript">function gogo(){  
    parent.location.href="目的地址" ;  
    }  </script> 中写成parent.indexFrame.frameElement.src = showUrl;如果出现错误就多测试一下,问题就是获取iframe的问题,parent.indexFrame.frameElement.src 这一句多换一换试下,功能很好实现的!
      

  4.   

    父页面如下,也就是你说的bb
    <head>
        <title>无标题页</title>
    </head>
    <body>
    <iframe id="indexframe" width="200" height="300" src="HTMLPage.htm"></iframe>
    </body>
    </html>子页面1也就是你说的aa
    <head>
        <title>无标题页</title>
        <script type="text/javascript">
        function koko()
        {
            parent.document.all.indexframe.src = 'HTMLPage2.htm';
            alert(parent.document.all.indexframe.src);
        }
        </script>
    </head>
    <body>
        <input id="Button1" type="button" value="button" onmousedown="koko();" />
        
    </body>
    </html>子页面2 ,用来测试的,
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        <title>无标题页</title>
    </head>
    <body>
    <table><tr><td>fdafdafd</td></tr></table>
    </body>
    </html>
    测试通过,IE7.0 中,parent.document.all.indexframe.src这个是关键的地方,层次清楚了就可以了,上面的页面代码可以贴的不全,太晚了,要睡觉了
      

  5.   

    bb.html
    <html> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
    <title>无标题文档 </title> 
    </head> 
    <SCRIPT LANGUAGE="JavaScript"> 
    //你这里已经覆盖了window.location对象了,不能在使用location对象来更改url
    //可以使用document.location对象来更改url.以后命名不要和系统对象同名
     var location ="aa"; 
    </SCRIPT> 
    <body> 
    <table width="430" border="0" cellpadding="0" cellspacing="0" >   
       <tr> 
         <td> <iframe width="200" height="300" src="aa.html"> </iframe> </td> 
       </tr> 
    </table> 
    </body> 
    </html> aa.html
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
    <title>aa </title> 
    </head> 
    <body> 
    <a href="#" onclick="gogo()">词典 </a> 
    <script language="javascript">function gogo(){  
    parent.document.location="http://b2b.lvyou168.cn";//使用parent.document.location
    //parent.locaton.href="目的地址" ;  
    }  </script> 
    </body> 
    </html>