我正在尝试替换同一个div.
显然这行不通,这是我的代码。
$("#Number").each(function() {
var text = $(this).text();
$(this).text(text.replace("Monster", "Witch"));
});
$("#Number").each(function() {
var text = $(this).text();
$(this).text(text.replace("Girl", "Boy"));
});
Run Code Online (Sandbox Code Playgroud)
谢谢你。