Hi i Usually use this code to replace a text in a page
$(window).load(function() {
var html = document.body.innerHTML;
html = html.replace( /Any Text/g, '???' );
document.body.innerHTML = html;
});
The problem i have is i cant isert a url instead of "Any Text"... my question is how do you do this:
$(window).load(function() {
var html = document.body.innerHTML;
html = html.replace( /http://subd.url.com/index.php?page=category/items/392/???/all/-1/-1/%20/%20/%20//g, 'http://www.newurl.com/foro/' );
document.body.innerHTML = html;
});
Thanks,
Also i know its better to use an Id like this..
$(window).load(function() {
$("#stID").attr("href", "http://www.newurl.com/foro/");
});
But this time i have to look in the entire body thanks.
jquery is running so if anyone know how to do it with jquery yes im open to jquery. thanks