Return to Snippet

Revision: 5565
at March 16, 2008 15:33 by scriptmakingcom


Initial Code
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)
}

Initial URL
http://www.webdeveloper.com/forum/showthread.php?t=65477

Initial Description


Initial Title
Extract links from a webpage

Initial Tags
links

Initial Language
JavaScript