可以给iframe定义一个名字,然后将target设为这个名字就可以了。

解决方案 »

  1.   

    window.parent.iframename.document.location.href = "...";
      

  2.   

    <a href="c.htm" target=self>link</a>
      

  3.   

    test.htm<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head><body>
    <table width="75%" height="342" border="1">
      <tr>
        <td width="38%">sdasasdasdas</td>
        <td width="62%"><iframe name="test" src="b.htm" height="400" width="300"></iframe></td>
      </tr>
    </table>
    </body>
    </html>
    b.htm<a href="c.htm" target="_self">dfsdfsdfsdfs</a>