/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var anchors = document.getElementsByTagName("a"); var anchorHrefs = []; var linktext = []; var nexturl = new RegExp('[^"]*([^"]*tag[^"]*render.userLayoutRootNode.uP)[^"]*frm='); for (var i=0; i<anchors.length;i++) { if ( anchors[i].href.match(nexturl) ) { //anchorHrefs.push(anchors[i].href+"\n"); //linktext.push(anchors[i].innerHTML+"\n"); //anchors[i].style.borderStyle='double'; //anchors[i].style.borderColor='green'; console.log(anchors[i].innerHTML + ' = ' + anchors[i].href + '\n'); } } alert(anchorHrefs); alert(linktext);