Return the protocol of the URL for a specific area in an image-map:
The result of x will be:
The protocol property sets or returns the protocol part of the href attribute value.
The href attribute specifies the destination of a link in an area.
The protocol is a standard that specifies how data are transmitted between computers.
The protocol property is supported in all major browsers.
Return the portocol property:
Set the protocol property:
Value | Description |
---|---|
protocol |
The protocol of a URL. Possible Values:
|
Return Value: | A String, representing the protocol part of the URL, including the colon sign (:) |
---|
Change the protocol part of a specific area in an image-map:
JavaScript reference: location.protocol Property