/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function DoPrintLinks() { var nCount = 0; var nEnd = document.links.length; var outpt="According to JavaScript, this document has "+nEnd+ " link(s) in it.<br>" for (nCount = 0 ; nCount < nEnd ; nCount ++){ outpt+=document.links[nCount].href + "<br>" } document.write(outpt) }
URL: http://www.webdeveloper.com/forum/showthread.php?t=65477
Comments
