JQuery對象和DOM對象的相互轉換

1JQuery對象和DOM對象的區別: code jQuery對象中沒法使用DOM對象的任何方法。對象 DOM對象也不能使用jQuery裏面的方法。get 2將JQuery對象轉化爲DOM對象,一共兩種方法:使用[index]和get(index)console 例如://第一種方法 console.log($('#dd')); console.log($('#dd')[0]); //第二種方法
相關文章
相關標籤/搜索