1. each 1. $.each(要遍歷的對象, function(){...}) 2. $("").each(function(){ // this 是進入循環體的當前標簽 console.log(this); }) 3. 退出本層循環 return 4. 退出each循環 return false 2. .data() 1. .data(key, value) --> 存值 2. .data(key) --> 根據key取值 3. .data() --> 取所有鍵值對 4. .removeData(key) --> 根據key刪除值 5. .removeData() --> 刪除所有鍵值對 3. 擴展 1. $.extend() --> 給jQuery擴展自定義方法 2. $.fn.extend() --> 給jQuery對象擴展自定義方法
