标签:table 添加一行
<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>
本文出自 “JianBo” 博客,转载请与作者联系!
标签:table 添加一行
原文地址:http://jianboli.blog.51cto.com/12075002/1944580