'protocol' Example : protocol « Javascript Properties « JavaScript Reference

'protocol' Example

    
<html>
<body>
<script language="JavaScript">
function function1() {
   alert(document.getElementById("myA").protocol);
}
</script>
<a id="myA" href="http://www.java2s.com" target="_blank">java2s.com home page</a>
<input type="Button" id="myB" value="Protocol" onClick="function1();">
</body>
</html>

    
      
      








Related examples in the same category

1.'protocol' Syntax and Note
2.'protocol' is applied to