jQuery 中的最基本代码 4句话

时间:2014-07-26 14:06:55   收藏:0   阅读:319
(function(){  
var	
jQuery = function( ) {return new jQuery.init( );}; 	//1
jQuery.prototype = 
    {
	init:function(){},
	fx:function(){
		alert(‘这是类库的一个实例化方法[fx]‘);
		         }
	}; //2
jQuery.prototype.init.prototype = jQuery.prototype; //3
window.doll= window._ = jQuery;	//4
})()
doll().fx();

  

jQuery 中的最基本代码 4句话,布布扣,bubuko.com

原文:http://www.cnblogs.com/ssnowy/p/3869651.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!