要取得映像的 usemap 屬性值,請使用 useMap 屬性。您可以嘗試執行以下程式碼來顯示 usemap 屬性值 -
<!DOCTYPE html> <html> <body> <img id = "myid" src = "/images/html.gif" alt = "HTML Map" usemap = "#html"/> <map name = "html"> <area id = "myarea" shape = "circle" coords = "154,150,59" href = "about.htm" alt = "Team" > </map> <script> var x = document.getElementById("myid").useMap; document.write("<br>Usemap: "+x); </script> </body> </html>#
以上是如何使用JavaScript取得影像的usemap屬性的值?的詳細內容。更多資訊請關注PHP中文網其他相關文章!