Javascript examples for DOM HTML Element:Area
Area port Property - Change the port number of the URL for a specific area in an image-map:
<!DOCTYPE html> <html> <body> <img src="http://java2s.com/resources/a.png" width="145" height="126" usemap="#myMap"> <map name="myMap"> <area id="myId" target="_blank" shape="circle" coords="125,60,10" alt="Venus" href="http://www.example.com:80/test.htm"> </map>//from www . j a v a 2s . c o m <button onclick="myFunction()">change the port number of the href attribute</button> <p id="demo"></p> <script> function myFunction() { document.getElementById("myId").port = "443"; document.getElementById("demo").innerHTML = "The port number was changed from '80' to '443'."; } </script> </body> </html>