jQuery源码--------get方法

来源:互联网 发布:送女朋友生日礼物知乎 编辑:程序博客网 时间:2024/06/05 20:04
get: function( num ) {
return num == null ?

// Return a 'clean' array
this.toArray() :


// Return just the object
( num < 0 ? this[ this.length + num ] : this[ num ] );

}


不传参数就是调用toArray方法(jQuery对象转数组的方法),传负数就是倒序找到,

0 0