August 1999
Intermediate to advanced
1488 pages
72h 53m
English
location.protocol
The protocol property of the Location object represents the protocol portion of the URL. This is located in the beginning of the URL address (the text before ://).
In the following fictitious Web address:
http://www.mcp.com:80/foo?something#foobar
the protocol value would be the http portion.
The protocol property is used in Listing 7.386.
<html> <head> <title> Using the protocol property of the Location object</title> </head> <body> <script language="JavaScript"> <!-- Hide // Function to display the protocol value function show(){ document.form1.text1.value=document.location.protocol; ... |
Read now
Unlock full access