Link.protocol : a link : HTML Tags JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » HTML Tags » a link »

 

Link.protocol








The protocol property represents the protocol being used in the current Web browser.

This is the first piece of text in the URL.












<html>
    <head>
    <title> Using the protocol property of the Link object</title>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    function showproto(){
         alert(document.links[0].protocol);
    }
    -->
    </script>
    Click the button to see the protocol used for the URL
    <form name="form1">
    <a href=http://www.navioo.com>
    http://www.navioo.com</a>
    <br><br>
    <input type="button" name="proto" value="Get Protocol" onClick='showproto()'>
    <br>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo HTML Tags
» a link