HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <img src="devices.jpg" alt="apple Devices" usemap="#apple-products"> <map name="apple-products"> <area shape="rect" coords="10,20,340,350" alt="macbook" href="/macbook.htm"> <area shape="rect" coords="355,185,540,340" alt="ipad" href="/ipad.htm"> <area shape="rect" coords="545,240,625,340" alt="iphone" href="/iphone.htm"> </map> <p>Click the button to find the number of link(s) in this document.</p> <button onclick="myFunction()">Click Me</button> <p id="point"></p> <script> var x = document.getElementById("point"); function myFunction(){ x.innerHTML = document.links.length; } </script> </body> </html>
OUTPUT
×

Save as Private