Home » » Get all links of a webpage with bookmarklet

Get all links of a webpage with bookmarklet

Written By Unknown on Sabtu, 03 Desember 2011 | 03.57

Hello friends. Want to get all the links of a webpage. Here you are at right place. A simple javascript bookmarklet can do this stuff.

You only have to follow these simple steps.

1. Create an Html file with following code.
2. Run this file and create a bookmarklet.
3. Open the webpage which you want to get the links.
4. Just click your bookmarklet.

You will see all the links of that webpage displayed infront of you.

Thats it. Thanks !!

  <a href='javascript:loc=location.href;
title=document.title;
x=document.getElementsByTagName("A");

y=window.open();
y.document.write("<html><body><h3>Links: "+loc+"</h3>\n");

for(n=0;n<x.length;n++){

if(x[n].href!=""){
if(x[n].text.replace(/\s+/,"").length<1){
for(j=0;j<x[n].childNodes.length;j++) {
if(x[n].childNodes[j].nodeName=="IMG"){
y.document.write(""); break;
}
}
}else{
y.document.write(" "+x[n].href+"<br>");
}
}
}
y.document.write("</body></html>");
y.document.close();void(0);'>Get Links</a>

Share this article :

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kumpulan Kata Broadcast Blackberry - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger