0
我只想克隆html tr和th的,但不能捕獲外部的thead/thead元素。JQuery只克隆一個表中的每個tr
<thead id="justCloneTR"> // don't clone
<tr id="Vehicle_1"> // clone
<th>1</th> // clone
<th>2</th> // clone
</tr> // clone
</thead> // don't clone
<div id="putCloneHere"></div>
JS
$('#justCloneTR').clone('tr').appendTo('#putCloneHere');
['$( '#Vehicle_1').clone();'(http://api.jquery.com/clone) – 2012-01-31 20:40:42
該死!那很容易。感謝Rob! – user1040259 2012-01-31 20:42:48