こんにちは私は通常、このコードを使用してページ内のテキストを置き換えます
$(window).load(function() {
var html = document.body.innerHTML;
html = html.replace( /Any Text/g, '???' );
document.body.innerHTML = html;
});
私が抱えている問題は、「任意のテキスト」の代わりにURLを挿入できないことです...私の質問は、これをどのように行うかです:
$(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;
});
ありがとう、
また、このようなIDを使用する方が良いことも知っています..
$(window).load(function() {
$("#stID").attr("href", "http://www.newurl.com/foro/");
});
でも今回は体全体を見なければなりません。
jqueryが実行されているので、誰かがjqueryでそれを行う方法を知っていれば、jqueryを開いています。ありがとう