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