Area protocolProperty
Area Object
Definition and Usage
The protocol property can set or return the protocol part of the href property value.
Syntax
areaObject.protocol=protocol
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the protocol property
Example
Example
The following example returns the protocol in the "Venus" area:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example(example.com)</title>
</head>
<body>
<img src="planets.gif.html" width="145" height="126" usemap="#planetmap">
<map name="planetmap">
<area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm.html">
</map>
<p>Protocol of the Venus area:
<script>
document.write(document.getElementById('venus').protocol);
</script>
</p>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>Example(example.com)</title>
</head>
<body>
<img src="planets.gif.html" width="145" height="126" usemap="#planetmap">
<map name="planetmap">
<area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm.html">
</map>
<p>Protocol of the Venus area:
<script>
document.write(document.getElementById('venus').protocol);
</script>
</p>
</body>
</html>
The output result of the above example is:
Protocol of the Venus area: http:
Try it yourself »
Area Object Other extensions