<html>
<head>
<script src="jquery-1.4.3.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$(this).clone(true).insertAfter(this);
});
});
</script>
</head>
<body>
<button>Clone Me!</button>
</body>
</html></span>
运行发现clone的 Clone Me! 无法继续点击克隆。但是clone(true)出来的 Clone Me! 可以继续克隆,和原本按钮没有区别。
所以clone();只是单纯的复制,复制后的节点 不具备 任何行为
clone( true ) ,它的含义是 复制元素的同时,复制元素中所绑定的事件