'links' Example
<html> <body> <a href="http://www.java2s.com">www.java2s.com website</a> <button onclick="alert(document.links.length);"> No. of links on page </button> </body> </html>