Change URL and text of a hyperlink : Hyper Link : HTML JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » HTML » Hyper Link »

 

Change URL and text of a hyperlink



<html>

<head>
<script type="text/javascript">
function myHref(){
    document.getElementById('myAnchor').innerHTML="Visit Google"
    document.getElementById('myAnchor').href="http://www.google.com"
}
</script>
</head>

<body>
    <a id="myAnchor" href="http://www.navioo.com">Visit navioo</a>
    <form>
        <input type="button" onclick="myHref()" value="Change URL and text">
    </form>
</body>

</html>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo HTML
» Hyper Link