1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<table id=
"selected_user_table"
width=
"100%"
>
<thead>
<tr><th
class
=
"center"
colspan=
"2"
style=
"background-color:#F2F2F2;height:20px;"
>已选择</th></tr>
</thead>
<tbody id=
"select_user_td"
>
</tbody>
</table>
<script>
//添加一行
var trHTML =
"<tr id='tr_"
+row.id+
"'><td width='10%'><input name='selected_user' type='checkbox'/></td></tr>"
if
(isOder){
$(
"#select_user_td tr:eq("
+num+
")"
).after(trHTML);
}
else
{
$(
"#select_user_td"
).append(trHTML);
}
//删除一行
$(
"#tr_"
+row.id).remove();
//选中tr,然后删除。
</script>
|
本文转自建波李 51CTO博客,原文链接:http://blog.51cto.com/jianboli/1944580,如需转载请自行联系原作者