<iframe name="new"></iframe>   
<a href="login.htm" id="other" target="new">login</a>
...
<a href="link.htm" id="mine" target="new">open</a>针对上述的程序:
 当点击open时,不但要打开link.htm,
 还要把id是other的显示与连接对象给改了,如:
  login ⇒ logout
  login.htm ⇒ logout.htm

解决方案 »

  1.   

    <iframe name="new"  id="new" style="border:1px solid red;width:500px;height:200px;"> </iframe>  
    <a href="login.htm" id="other" target="new">login </a> 
    ... 
    <a href="link.htm" onclick="op()" id="mine"  target="new">open </a> 
    <script type="text/javascript">
    function op(){
    document.getElementById('other').href='logout.htm';
    document.getElementById('other').innerHTML ='logout';
    }
    </script>