如果说要判断是否同一对象,当然是用 === 来判断,但实际上两个不同的 jQuery 对象可能是对同一个/组 DOM 对象的封装,这个时候可以用 is 来判断,比如var a = $(".editor");var b = $(".editor");console.log(a === b);// falseconsole.log(a.is(b));// true
and then a smile would come upon the face