有2個(gè)table A和B,現(xiàn)在要把B中每一行checkbox 選中了的插入到A中的最上面,并且把checkbox這個(gè)td節(jié)點(diǎn)刪除.一下是html代碼
表A
<table id="A"><tbody>
<tr><th>姓名</th>......<tr>
<tr><td>李四</td>......</tr>
<tr><td>張三</td>......</tr>
......
</tbody></table>
表B
<table id="B"><tbody>
<tr><th>選擇</th><th>姓名</th>......<tr>
<tr><td><input type="checkbox"/></td><td>李四</td>......</tr>
<tr><td><input type="checkbox"/></td><td>張三</td>......</tr>
......
</tbody></table>
<input type="button" onlick="" value="開始從B移動(dòng)到A">
A和B的區(qū)別就是B多了一列是checkbox。
其實(shí)我自己也實(shí)現(xiàn)了,不過感覺不夠優(yōu)雅,沒有充分運(yùn)用jQuery的內(nèi)置函數(shù)的方便性。
所以來問下
jquery節(jié)點(diǎn)復(fù)制、刪除、插入的問題
大話西游666
2018-12-06 11:42:47