protokol properti HTML DOM di Area
Definisi dan Penggunaan
protokol set properti atau mengembalikan bagian protokol nilai atribut href.
tatabahasa
areaObject.protocol=protocol
Dukungan Browser
Semua browser utama mendukung properti protokol
contoh
contoh
Contoh berikut mengembalikan "Venus" kesepakatan area:
<!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>
<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>
Contoh output di atas:
Venus wilayah protokol: http:
Coba »
benda daerah