zoukankan      html  css  js  c++  java
  • 表格删除一行

    <!--删除表格指定行/删除表格某行/删除表格一行-->
    
    
    <table class="table table-hover table-bordered" id="resetApplyTable" style="table-layout:fixed;min-142%;">
    	<thead>
    		<tr>
    			<th class="text-center fixFirstColum" style=" 121px">人员姓名&nbsp;<font color='red'>*</font></th>
    			<th class="text-center" style=" 237px">身份证号</th>
    			<th class="text-center" style=" 118px">身份</th>
    			<th class="text-center" style=" 227px">绑定关系</th>
    			<th class="text-center" style=" 220px">手机号</th>
    			<th class="text-center" style=" 200px">IMSI1</th>
    			<th class="text-center" style=" 200px">IMSI2</th>
    			<th class="text-center" style=" 88px">运营商</th>
    			<th class="text-center" style=" 194px">终端型号</th>
    			<th class="text-center" style=" 137px">密码模块类型</th>
    			<th class="text-center" style="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=" -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=" -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=" -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=" -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>
    
    
  • 相关阅读:
    云区域(region),可用区(AZ),跨区域数据复制(Cross-region replication)与灾备(Disaster Recovery)(部分1)
    云区域(region),可用区(AZ),跨区域数据复制(Cross-region replication)与灾备(Disaster Recovery)(部分2)
    VLAN 模式下的 OpenStack 管理 vSphere 集群方案
    理解Kubernetes(2): 应用的各种访问方式
    理解Kubernetes(1):手工搭建Kubernetes测试环境
    2017这一年(内空)
    eKing Cloud基础云平台演进之路
    《重新定义公司
    使用 Kafka 和 ELK 搭建测试日志系统(1)
    [译] OpenStack Pike 版本中的 53 个新功能盘点
  • 原文地址:https://www.cnblogs.com/yonyong/p/11298973.html
Copyright © 2011-2022 走看看