jQuery to get anchor link URLs and texts on a page

On google chrome developer console (F12), simply run command below to get link texts printout:

jQuery("a.classname").each( function(){ console.log( $(this).text() ); } );

If you need to get link URLs, try the code below:

jQuery("a.classname").each( function(){ console.log( $(this).attr('href') ); } );

Remember to change classname to appropriate class name.

If the page you are trying to parse doesn’t have jQuery, you can load jQuery from console also.

Related Posts

NS Weight Release

WP-Backgrounds Lite by InoPlugs Web Design and Juwelier Schönmann 1010 Wien