Baseline Widely available
HTMLMapElement
æ¥å£ç areas
åªè¯»å±æ§è¿åå
³è <map>
å
ç´ ç <area>
å
ç´ éåã
ä¸ä¸ªå
å« HTMLAreaElement
å
ç´ ç HTMLCollection
对象ã
<map id="image-map">
<area shape="circle" coords="50,50,35" alt="å·¦ç®å¤´" />
<area shape="circle" coords="150,50,35" alt="å³ç®å¤´" />
</map>
<img usemap="#image-map" src="left-right-arrow.png" alt="å·¦å³ç®å¤´å¾ç" />
<output></output>
output {
display: block;
}
const mapElement = document.getElementById("image-map");
const outputElement = document.querySelector("output");
for (const area of mapElement.areas) {
area.addEventListener("click", (event) => {
outputElement.textContent = `ä½ ç¹å»äº${area.alt}åºåã\n\n`;
});
}
ç»æ è§è æµè§å¨å
¼å®¹æ§ åè§
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4