更新时间:2023-02-13 13:02:09
只需将内容存储到变量中,并检查在blur()
事件之后它是否不同.如果不同,请存储新内容.
Just store the contents to a variable and check if it is different after blur()
event. If it is different, store the new contents.
var contents = $('.changeable').html();
$('.changeable').blur(function() {
if (contents!=$(this).html()){
alert('Handler for .change() called.');
contents = $(this).html();
}
});