去除 struts2 标签中的自动生成的布局样式table/tr/td+ 全选 反选

  <table>
			<thead>
				<tr>
				<th width="100"><s:checkbox id="doAllSele" value="" οnclick="selectAll()" name="jcgwVO.img" theme="simple"></s:checkbox></th>
					<th width="100">序号</th>
					<th width="100">caseNo</th>
					<th width="100">caseName</th>
					<th width="200">caseDate</th>
					<th width="100">caseAddress</th>
					<th width="100">inPhone</th>
					<th width="100">binRenXuQiu</th>
					<th width="200">daoYuanDate</th>
					<th width="400">remark</th>
					<th width="100">zhiBanYuan</th>
					<th width="100">isCaseOver</th>


				</tr>
			</thead>
			<s:iterator id="caseinfo" value="caseinfolist" status="st">
			<tr>
			<td><s:checkbox id="doSele" name="jcgwVO.gwmc" theme="simple"></s:checkbox></td>
				<td><s:property value="#st.phoneId" />${st.index+1}</td>
				<td><a href="caseinfo.action?caseinfo.caseNo=${caseinfo.caseNo}" target="_blank">${caseinfo.caseNo}</a></td>
				<td>${caseinfo.caseName}</td>
				<td>${caseinfo.caseDate}</td>
				<td>${caseinfo.caseAddress}</td>
				<td>${caseinfo.inPhone}</td>
				<td>${caseinfo.binRenXuQiu}</td>
				<td>${caseinfo.daoYuanDate}</td>
				<td>${caseinfo.remark}</td>
				<td>${caseinfo.zhiBanYuan}</td>
				<td>${caseinfo.isCaseOver}</td>
				
			</tr>
		</s:iterator>       
       </table>  
struts2标签 <s:checkbox> 的全选与反选:
<script type="text/javascript">

 function selectAll(){

  var click = document.getElementById("doAllSele").checked;

  var arryObj = document.getElementsByName("jcgwVO.gwmc");

  for(var i=0;i<arryObj.length; i++){

   if(typeof arryObj[i].type != "undefined"

    && arryObj[i].type == "checkbox"){

     if(click == true){

     arryObj[i].checked = true;

    }else{

     arryObj[i].checked = false;         

    }

   }

  }

 }
 
</script>

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值