【发布时间】:2015-04-21 01:58:17
【问题描述】:
我正在尝试替换同一 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"));
});
谢谢。
【问题讨论】: