protocolLong property (a)
Retrieves a long description about the protocol component of the URL assigned to the object.
To get the shorthand protocol name, use the protocol property.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read-only.
Possible values:
String that specifies the long description.
One of the following values:
Protocol is a file protocol. (file:) | |||||||
Protocol is a HyperText Transfer protocol. (http:) | |||||||
Protocol is a HyperText Transfer protocol with Privacy. (https:) | |||||||
Protocol is a MailTo protocol. (mailto:) | |||||||
Protocol is a News protocol. (news:) |
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the protocolLong property for an anchor:
|
||||
<head> <script type="text/javascript"> function AnalyzeTarget () { var anchor = document.getElementById ("myAnchor"); var message = ""; message += "hash: " + anchor.hash + "\n"; message += "host: " + anchor.host + "\n"; message += "hostname: " + anchor.hostname + "\n"; message += "href: " + anchor.href + "\n"; message += "pathname: " + anchor.pathname + "\n"; message += "port: " + anchor.port + "\n"; message += "protocol: " + anchor.protocol + "\n"; message += "protocolLong: " + anchor.protocolLong + "\n"; message += "search: " + anchor.search + "\n"; alert (message); } </script> </head> <body> <a href="http://help.dottoro.com/test.php?id=2#bookmark" id="myAnchor">A sample anchor</a> <br /><br /> <button onclick="AnalyzeTarget ();">Analyze the destination of the anchor above</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
Related pages:
User Contributed Comments