在struts中使用checkbox实现批量删除

这是一个关于家庭信息管理系统的页面,展示家庭详细信息,包括所属小区、家庭名称、成立日期等,并提供了编辑和删除操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

    <form id="delForm" method="post" action="delFamilyAll.do">
      <div>

       <table align="center" cellpadding="4" cellspacing="1" border="0"
        width=100%>
        <tr>
         <td height="25" class="category t2" width=200>
          家庭管理>>家庭详细信息
         </td>
        </tr>
       </table>

       <table width="100%" height="5" border="0" cellspacing="0"
        cellpadding="0">
        <tr>
         <td align="center" height="20">
          <logic:empty name="list">
       没有相关数据 ...
       </logic:empty>
         </td>
        </tr>
       </table>
       <logic:notEmpty name="list">

        <table width="100%" align="center" cellpadding="0"
         cellspacing="1">
         <tr style="background-color: #3890B5; height: 30px"
          align="center">
          <td align="center">
           <span style="color: White">&nbsp;

          </td>
          <td align="center">
           <span style="color: White">所属小区
          </td>
          <td align="center">
           <span style="color: White">家庭名称
          </td>
          <td align="center">
           <span style="color: White">成立日期
          </td>
          <td align="center">
           <span style="color: White">操作
          </td>
         </tr>

         <logic:iterate id="family" name="list">
          <logic:present name="family">
           <tr style="background-color: #F6F6F6; height: 25px">
            <td align="center">
             <input type="checkbox" name="ids"
              value='<bean:write name = "family" property = "id"/>'>
            </td>

            <td align="center">
             <c:set var="id">
              <bean:write name="family" property="subdistrictId"></bean:write>
             </c:set>
             ${my:findSubName(id)}
            </td>
            <td align="center">
             <bean:write name="family" property="familyName"></bean:write>
            </td>
            <td align="center">
             <bean:write name="family" property="familyTime"></bean:write>
            </td>
            <td align="center">
             <!--  <a
            href="catSeleUp.do?id=<bean:write name="family" property="id"></bean:write>">
            <img src="admin/images/icon_edit.gif" style="border: 0"
             alt="编辑">
           </a> |
           -->
             <a οnclick="return confirm('你确定要删除吗');"
              href="dele.do?id=<bean:write name="family" property="id"></bean:write>">
              <img src="admin/images/no.gif" style="border: 0" alt="删除">
             </a>
            </td>
           </tr>
          </logic:present>
         </logic:iterate>
        </table>
       </logic:notEmpty>
       <table cellspacing="1" cellpadding="0" width="100%"
        bgcolor="#9db2d4" border="0" align="center"
        style="text-align: center">

        <tbody>
         <tr bgcolor="#3890B5" height="25">
          <td style="width: 178px">
           <table width="100%" height="25" border="0" cellspacing="0"
            cellpadding="0">
            <tr>
             <td align="right" height="25">
              <input type="button" value="全选" height="25"
               οnclick="for (var i = 0; i < delForm.ids.length; i ++){delForm.ids[i].checked = true;}" />
              <input type="button" value="反选" height="25"
               οnclick="for (var i = 0; i < delForm.ids.length; i ++){delForm.ids[i].checked = false;}" />
              <input type="button" value="删除选中" height="25"
               οnclick="if(confirm('真的要删除选中内容?'))delForm.submit()" />

             </td>
            </tr>
           </table>
          </td>

         </tr>
        </tbody>

       </table>


      </div>
     </form>

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Micheal_NET

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值