HTML DOM protocol Property
Definition and Usage
The protocol property sets or returns the protocol of the current URL.
Syntax
Example
Assume that the current URL is: http://example.com/test/test.htm#part2:
<html>
<body>
<script type="text/javascript">
document.write(location.protocol);
</script>
</body>
</html>
|
Output:
Try-It-Yourself Demos
Use the
protocol property of the location object
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|