Javascript :Replace URL content string with another url -
javascript :replace url content--i have following html file , want replace url new url problem dont know exact value of a0 ,it can url,any appreciated thanks
<html> <body> <a href="http://www.google.com?query=domain">domain</a> <script> document.body.innerhtml=document.body.innerhtml.replace('<ahref='.concat('\"http:*****************\"//','>domain</a>'),'domain');
document.body.innerhtml=document.body.innerhtml.replace('domain','http://www.google.com?query=hello\"','domain>domain'));
</script> </body> </html>
loop anchors , swap (in load event)?
var links = document.getelementsbytagname("a"); (var = 0; < links.length; i++) { if (links[i].href.tolowercase() == a0) { links[i].href = a1; } }
Comments
Post a Comment