()();   闭包,让声明的变量变成局部变量,使外部无法访问,防止和其他代码冲突,互不影响。

 

(function(){

})();              和一般执行方法一样的。

 

jQuery=function(){

  return new jQuery.prototype.init();

}

    jQuery.init=function(){ } 

   jQuery.css=function(){}

//这句是重点 使得下面 jQuery() 返回的 具有 原型css方法

 jQuery.prototype.init.prototype=jQuery.prototype;

 

jQuery().css();

相关文章:

  • 2021-12-07
  • 2022-01-28
  • 2021-09-15
  • 2021-12-11
  • 2021-09-18
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-14
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2022-02-24
相关资源
相似解决方案