Skip to content

Instantly share code, notes, and snippets.

@RupGautam
Created November 14, 2017 19:20
Show Gist options
  • Save RupGautam/cd9ae0a930da33693afce378cdcfd880 to your computer and use it in GitHub Desktop.
Save RupGautam/cd9ae0a930da33693afce378cdcfd880 to your computer and use it in GitHub Desktop.
Get all the hrefs from webpage
var links = document.querySelectorAll('#content a');
for(var i = 0; i < links.length; i++){
console.table(links[i].href);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment