ajax中$(this)指向问题

在jQuery使用ajax后$(this)失效,$(this)指向的是最近调用它的jquery对象
即$(this)就是表示ajax对象了。

解决方案:
在ajax外赋值一个变量 $this = $(this)

例如:
$(this).html();(写在ajax中不能使用)
$this.html();(在ajax外this指向赋值 $this = $(this) 后可以使用)
原文地址:https://www.cnblogs.com/caopeng/p/13902825.html