<html> <head> <script type="text/javascript"> function myHref() { document.getElementById('myAnchor').innerText="Visit java Scripting" document.getElementById('myAnchor').href="http://www.javascripting.tk" } </script> </head> <body> <a id="myAnchor" href="http://www.azhar-world.tk">Visit Azhar-world</a> <form> <input type="button" onclick="myHref()" value="Change URL and text"> </form> </body> </html>
Edit the text above, and click on the button to see the result.
Copyright © 2007-2008, Www.JavaBasics.We.Bs All rights reserved.