<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
<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
<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>