圖片上傳不了,老出錯;就只能復(fù)制啦!這個是我自己構(gòu)造的對象,用console.log輸出看到是這樣;foo.fn.foo.init{0:div,1:div,2:div,3:div,4:div,selector:"div",init:function,aouth:"jer",age:24,add:"江西"…}jquery對象用console.log輸出像一個數(shù)組;[div,div,div,div,div,prevObject:b.fn.b.init[1],context:document,selector:"div",jquery:"1.9.1",constructor:function…]想知道它是怎么實現(xiàn)的,下面是我寫的源碼;(function(){functionfoo(selector){returnnewfoo.prototype.init(selector);};foo.fn=foo.prototype={init:function(selector){varelems=document.getElementsByTagName(selector),len=elems.length,i=0;for(;i
jQuery對象用console.log輸出看到的很像數(shù)組是怎么實現(xiàn)的?
阿晨1998
2019-04-13 08:45:28