码迷,mamicode.com
首页 > 其他好文 > 详细

表格删除一行

时间:2019-08-04 18:01:58      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:cte   Nero   val   enter   UNC   tap   func   中兴   删除   

<!--删除表格指定行/删除表格某行/删除表格一行-->
<table class="table table-hover table-bordered" id="resetApplyTable" style="table-layout:fixed;min-width:142%;">
    <thead>
        <tr>
            <th class="text-center fixFirstColum" style="width: 121px">人员姓名&nbsp;<font color='red'>*</font></th>
            <th class="text-center" style="width: 237px">身份证号</th>
            <th class="text-center" style="width: 118px">身份</th>
            <th class="text-center" style="width: 227px">绑定关系</th>
            <th class="text-center" style="width: 220px">手机号</th>
            <th class="text-center" style="width: 200px">IMSI1</th>
            <th class="text-center" style="width: 200px">IMSI2</th>
            <th class="text-center" style="width: 88px">运营商</th>
            <th class="text-center" style="width: 194px">终端型号</th>
            <th class="text-center" style="width: 137px">密码模块类型</th>
            <th class="text-center" style="width:80px">操作</th>
        </tr>
    </thead>
    <tbody  id="zaicitishenbody">
        
    </tbody>
</table>
function test(){
    zaicitishenbody.deleteRow(i);
    <!--或者-->
    $("#zaicitishenbody")[0].deleteRow(0);
    <!--第一个没用选择器,zaicitishenbody拿到的是html片段,如附录A。能成功,神奇-->
}
<!--附录A:-->
<tbody id="zaicitishenbody"><tr><td class="text-center fixFirstColum" name="1700255" style="white-space:normal;padding-top: 17px;"><div class="" title="江永志">江永志</div></td><td class="text-center" name="1700255" style="white-space:normal;padding-top: 20px;"><div class="" title="330102197107260918">330102197107260918</div></td><td class="text-center" name="1700255" style="white-space:normal;padding-top: 17px;"><div class="" title="民警">民警</div></td><td class="text-center" name="1700255" style="white-space:normal;padding-top: 20px;"><br></td><td class="text-center" name="1700255" style="white-space:normal;padding-top: 20px;"><div id="zaiCiTiShenPhone1700255" contenteditable="true" class="autocut" title="4600236892213">4600236892213</div></td><td class="text-center" name="1700255" style="white-space:normal;padding-top: 20px;"><div id="zaiCiTiShenIMSI11700255" contenteditable="true" name1="imsi" class="autocut1" title="460023689285201">460023689285201</div></td><td class="text-center" name="1700255" style="white-space:normal;padding-top: 20px;"><div id="zaiCiTiShenIMSI21700255" contenteditable="true" class="autocut" title=""></div></td><td class="text-center" name="1700255" style="white-space:normal;padding-top: 17px;"><div id="zaiCiTiShenOperators1700255" class="" title="移动">移动</div></td><td><select class="selectpicker show-tick form-control" style="width: -webkit-fill-available;" id="zaiCiTiShenTerminal1700255" name="selectTest"><option selected="selected" value="OPPOR9s" text="OPPOR9s">OPPOR9s</option><option value="vjvoop全网通(11)" text="vjvoop全网通(11)">vjvoop全网通(11)</option><option value="vivooo移动版(90)" text="vivooo移动版(90)">vivooo移动版(90)</option><option value="bva全网通(0)" text="bva全网通(0)">bva全网通(0)</option><option value="中兴ZTE()" text="中兴ZTE()">中兴ZTE()</option><option value="华为荣耀" text="华为荣耀">华为荣耀</option></select></td><td><select class="selectpicker show-tick form-control" style="width: -webkit-fill-available;" id="zaiCiTiShenAuthtype1700255" name="selectTest"><option selected="selected" value="360" text="360">360</option><option value="创原手机盾" text="创原手机盾">创原手机盾</option><option value="信大捷安" text="信大捷安">信大捷安</option><option value="中兴" text="中兴">中兴</option><option value="999" text="999">999</option><option value="ttt·1" text="ttt·1">ttt·1</option><option value="567" text="567">567</option><option value="a" text="a">a</option><option value="y" text="y">y</option><option value="test" text="test">test</option></select></td><td hidden="true">1700255</td><td class="text-center" style="white-space:normal;padding-top: 20px;"><a href="javascript:;" id="zaiCiTiShenSave1700255" onclick="saveZaicitishen(1700255)" class="iconfont icon-tijiao" style="margin-left:-1em"></a><a href="javascript:;" onclick="deleteOneRow(1700255)" class="iconfont icon-shanjian" style="margin-left:1em"></a></td></tr><tr><td class="text-center fixFirstColum" name="1700256" style="white-space:normal;padding-top: 17px;"><div class="" title="杨睿">杨睿</div></td><td class="text-center" name="1700256" style="white-space:normal;padding-top: 20px;"><div class="" title="330722198510220011">330722198510220011</div></td><td class="text-center" name="1700256" style="white-space:normal;padding-top: 17px;"><div class="" title="民警">民警</div></td><td class="text-center" name="1700256" style="white-space:normal;padding-top: 20px;"><br></td><td class="text-center" name="1700256" style="white-space:normal;padding-top: 20px;"><div id="zaiCiTiShenPhone1700256" contenteditable="true" class="autocut" title="413161551361">413161551361</div></td><td class="text-center" name="1700256" style="white-space:normal;padding-top: 20px;"><div id="zaiCiTiShenIMSI11700256" contenteditable="true" name1="imsi" class="autocut1" title="460023689296301">460023689296301</div></td><td class="text-center" name="1700256" style="white-space:normal;padding-top: 20px;"><div id="zaiCiTiShenIMSI21700256" contenteditable="true" class="autocut" title=""></div></td><td class="text-center" name="1700256" style="white-space:normal;padding-top: 17px;"><div id="zaiCiTiShenOperators1700256" class="" title="移动">移动</div></td><td><select class="selectpicker show-tick form-control" style="width: -webkit-fill-available;" id="zaiCiTiShenTerminal1700256" name="selectTest"><option selected="selected" value="OPPOR9s" text="OPPOR9s">OPPOR9s</option><option value="vjvoop全网通(11)" text="vjvoop全网通(11)">vjvoop全网通(11)</option><option value="vivooo移动版(90)" text="vivooo移动版(90)">vivooo移动版(90)</option><option value="bva全网通(0)" text="bva全网通(0)">bva全网通(0)</option><option value="中兴ZTE()" text="中兴ZTE()">中兴ZTE()</option><option value="华为荣耀" text="华为荣耀">华为荣耀</option></select></td><td><select class="selectpicker show-tick form-control" style="width: -webkit-fill-available;" id="zaiCiTiShenAuthtype1700256" name="selectTest"><option selected="selected" value="360" text="360">360</option><option value="创原手机盾" text="创原手机盾">创原手机盾</option><option value="信大捷安" text="信大捷安">信大捷安</option><option value="中兴" text="中兴">中兴</option><option value="999" text="999">999</option><option value="ttt·1" text="ttt·1">ttt·1</option><option value="567" text="567">567</option><option value="a" text="a">a</option><option value="y" text="y">y</option><option value="test" text="test">test</option></select></td><td hidden="true">1700256</td><td class="text-center" style="white-space:normal;padding-top: 20px;"><a href="javascript:;" id="zaiCiTiShenSave1700256" onclick="saveZaicitishen(1700256)" class="iconfont icon-tijiao" style="margin-left:-1em"></a><a href="javascript:;" onclick="deleteOneRow(1700256)" class="iconfont icon-shanjian" style="margin-left:1em"></a></td></tr></tbody>

表格删除一行

标签:cte   Nero   val   enter   UNC   tap   func   中兴   删除   

原文地址:https://www.cnblogs.com/yonyong/p/11298973.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!