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