1、eq返回的是一個jQuery對象,get
返回的是一個DOM對象。
一個原生的DOM對象obj = document.getElementById("my");
也可以通過$(obj)
將其變爲jq對象。
所以,$().eq(1)
與$( $().get(1) )
是等價的。(使用jQuery.merge(
this.constructor(), Dom);將一個Dom對象轉換成JQuery對象)
2、jquery通過jQuery prototype
的方法添加屬性方法
a.prototype=new b();//a 繼承b的所有屬性及方法
a.prototype.t=function(){};//a 的實例方法t(){};
3、Jquery定義全部函數 $.fn.xxx=function(){};