0
私はSharePointの2013年調査に別のテキストを置き換えると、問題に直面している:jQueryの/のSharePoint 2013のテキスト置き換え問題
私はこのテキスト交換したいと思います:"marshmellows"
と"Specify your own value:"
を。
残念ながら、このコードは機能しません。私はSPとjqueryのノブです。私はこの記事に基づかた :ここでは jQuery find and replace string
は私のコードは次のとおりです。すべての
$(document.body).find('*').each(function() {
var tmp = $(this).children().remove();
var text = $(this).text();
text = text.replace("Specify your own value:", "marshmellows");
$(this).text(text);
$(this).append(tmp);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
<div>
<p>
<h1>
<a>Specify your own value:</a>
</h1>
</p>
</div>