Answers for "js update all links"

0

js update all links

var anchors = document.getElementsByTagName("a");

for (var i = 0; i < anchors.length; i++) {
    anchors[i].href = "http://www.mysite.com/?redirect=" + anchors[i].href
}
Posted by: Guest on May-21-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language