(function(window,undefined){
var jQuery = (function(){
var jQuery = function(selector,context){
return new jQuery.init(selector,context,rootjQuery)
},
//一堆局部变量声明
jQuery.fn = jQuery.prototype = {//fn比prototype较短
constructor: jQuery;
init : function(selector , context , rootjQuery);
//一堆原形属性和方法
}
jQuery.fn.init.prototype = jQuery.fn; //确保jQuery()之后可以直接使用方法
//一堆静态属性方法
jQuery.extend = jQuery.fn.extend = function(){};
jQuery.extend({})
return jQuery
})()
winodw.jQuery = window.$ = jQuery;
})(window)
jquery框架概述
最新推荐文章于 2019-06-17 11:28:52 发布