📅  最后修改于: 2022-03-11 15:03:58.293000             🧑  作者: Mango
var previousText = null;
function foo() {
var currentText = $(".showText").text();
if (previousText == currentText) {
$(".showText").html("same text");
}
previousText = currentText;
}