為什么jQuery.fn.init()方法中的this是一個類數組對象,而不是指向的jQuery.fn?測試方法:init: function( selector, context, rootjQuery ) { var match, elem, ret, doc; // Handle $(""), $(null), or $(undefined) if ( !selector ) { console.log(this); // this是個空的類數組對象,這是為什么? return this; }執行$(null).
- 3 回答
- 0 關注
- 2436 瀏覽
添加回答
舉報
0/150
提交
取消