list1.remove([1,2]) ValueError: list.remove(x): x not in list # 值錯誤: 需要刪除的值不在列表中4. 一次只刪一個元素上面的案例中,列表 [1, 2] 看似在列表 [1, 2, 3] 中存在,實際上, remove() 函數(shù)判斷元素是否在列表中存在的標準是:匹配列表中的「單個元素」,而不是整個列表。remove()
三、detach: 從empty和remove的介紹中(英文斜體部分),可以或多或少得知,detach是不會移除事件句柄的。 那么我們再來看看詳細的API講解: The .detach() method is the same as .remove(), except that .detach() keeps all jQuery data associated with the removed elements. This method is useful when remove...