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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -