次のコードで(アクセスが拒否されました。ログインまたは登録してください。)のテキストを「アクセスする権限がありません」に変更したい:-
<div class="messages error">
<h2 class="element-invisible">Error message</h2>
Access denied. Please Login or Register.
</div>
Ready Function で次のコードを使用しようとしましたが、正しく動作しません。
$("div.messages").text(function () {
console.log($(this).text());
return $(this).text().replace("Access denied. Please Login or Register.", "You are not authorized to access");
});
ありがとう。
それを行う別の方法はありますか?それは私にエラーを与えます
Uncaught TypeError: Cannot set property 'nodeValue' of undefined ...