1.何时使用=== 何时使用== if(obj.name==null){ //这是jquery源码中的推荐写法 //相当于obj.name===null||obj.name===undefined,简写形式 } 除了这种情况都采用了===进行判断