Javascript examples for DOM HTML Element:Image
Image isMap Property - Set the isMap property:
<!DOCTYPE html> <html> <body> <a href="#"> <img id="myImg" src="http://java2s.com/resources/a.png" alt="java2s.com" width="100" height="132"> </a>// w ww .ja va 2s .c o m <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { document.getElementById("myImg").isMap = true; document.getElementById("demo").innerHTML = "The image is now part of a server-side image-map."; } </script> </body> </html>