Link.host : a link : HTML Tags JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » HTML Tags » a link »

 

Link.host







The host property represents the host portion of the URL.












<html>
    <head>
    <title> Using the host property of the Link object</title>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    function showHost(){
         alert(document.links[0].host);
    }
    -->
    </script>
    Click the button to see the host for the URL

    <form name="form1">
    <a href="http://www.navioo.com">navioo.com</a>
    <br><br>
    <input type="button" name="host" value="Get Host Value" onClick='showHost()'>
    <br>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo HTML Tags
» a link