清空節點和洗掉節點
//可以清空一個元素的內容 //清理門戶 $("div").empty();
//完全移除元素 $("div").remove();
$(function () { $(".des").click(function () { alert("hehe"); }) //clone //false:不傳引數也是深度復制,不會復制事件 //true:也是深復制,會復制事件 $(".des").clone(true).append("div"); $(".des").clone(false).appendTo("div"); });
console.log($(".des").clone());

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/17857.html
標籤:其他
上一篇:jQuery---創建和添加節點
下一篇:jQuery---城市選擇案例
