Area protocol 屬性

定義和用法
protocol 屬性可設置或者返回 href屬性值的協議部分。
語法
areaObject.protocol=protocol
流覽器支持
所有主要流覽器都支持 protocol 屬性
實例
實例
下麵的例子可返回 "Venus" 區域中的協議:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>IT研修(xuhuhu.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>
<html>
<head>
<meta charset="utf-8">
<title>IT研修(xuhuhu.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>
以上實例輸出結果:
金星區域的 protocol: http:
