一、为啥不推荐使用"use strict"
1、兼容性问题,低版本浏览器不支持
二、jQuery(document)为啥赋值给rootjQuery
1、方便压缩
2、便于阅读,可维护
三、typeof undefined
1、兼容旧版本浏览器
四、class2type作用
1、$.type() 检测obj的数据类型。
五、jQuery对象的隐式初始化
1、一般的对象初始化
function A(){
}
A.prototype.init =function(){};
A.prototype.css= function(){};
var a=new A();
a.init()
a.css();
2、jQuery的对象初始化
function jQuery() {
return new jQuery.prototype.init();
}
jQuery.prototype.init=function(){};
jQuery.prototype.css=function(){};
jQuery.prototype.init.prototype=jQuery.prototype;
jQuery().css();