<html><body> <A id="ATAG" onclick=myfunction()>Rewrite Function</A> <br> <A id="BTAG" onclick="testfunction()">Test Function</A> <br> <A id="CTAG"></A> <script> var savedHTML; function myfunction(){ savedHTML =document.anchors("BTAG").outerHTML document.anchors("BTAG").outerHTML = savedHTML document.anchors("CTAG").innerHTML ="Test Function Rewritten"; }; function testfunction(){ document.anchors("CTAG").innerHTML = "Test Function OK" ; }; function whatisatag(){alert(document.getElementById("ATAG").outerHTML);} function whatisbtag(){alert(document.getElementById("BTAG").outerHTML);} </script> <form><input type="button" value ="What is BTAG?" onclick="whatisbtag();"> <input type="button" value ="What is ATAG?" onclick="whatisatag();"></form> </body> </html>