Latest web development tutorials

HTML DOM Area protocol property

Area Object Reference Area objects

Definition and Usage

protocol property sets or returns the protocol part of href attribute values.

grammar

areaObject.protocol=protocol


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support protocol property


Examples

Examples

The following example returns "Venus" area agreement:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
</head>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">
<map name="planetmap">
<area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>
<p>金星区域的 protocol:
<script>
document.write(document.getElementById('venus').protocol);
</script>
</p>

</body>
</html>

Examples of the above output:

Venus protocol region: http:

try it"


Area Object Reference Area objects