运行 ❯
获取您
的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <img src="planets.gif" width="145" height="126" usemap="#planetmap"> <map id="myMap" name="planetmap"> </map> <p>Click the button to create an AREA element with a link to "venus.htm".</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = document.createElement("AREA"); x.setAttribute("href", "venus.htm"); x.setAttribute("shape", "circle"); x.setAttribute("coords", "124,58,8"); document.getElementById("myMap").appendChild(x); document.getElementById("demo").innerHTML = "The AREA element was created, and you can now click on the venus area in the image."; } </script> </body> </html>