check

   function chkall(input1)
   {
       var objForm = document.getElementById("contentForm");
       var objLen = objForm.length;
       for (var iCount = 0; iCount < objLen; iCount++){
           if (input1.checked == true){
               if (objForm.elements[iCount].type == "checkbox"){
                   objForm.elements[iCount].checked = true;
               }
           }else{
               if (objForm.elements[iCount].type == "checkbox"){
                   objForm.elements[iCount].checked = false;
               }
           }
       }
   }

<form id="contentForm" action="${contextPath}/background/manageNewsAction.do">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
       <!--分页处理开始,将action的路径替换即可, 拿到当前page的内容,迭代输出开始 -->
       <c:forEach var="articleInfo" items="${page.contentBulk}">
        <tr>
         <td width="7%" align="center">
          <input type="checkbox" name="ids" value='${articleInfo.id}' />
         </td>
         <td width="14%" align="center">
          ${articleInfo.type.typeName}
         </td>
         <td width="47%" align="center">
          ${articleInfo.title}
         </td>
         <td width="10%" align="center">
          ${articleInfo.author.username}
         </td>
         <td width="5%" align="center">
          ${articleInfo.status}
         </td>
         <td width="11%" align="center">
          ${articleInfo.issueDate}
         </td>
         <td width="6%" align="center">
          <input type="button" name="editnews" value="编辑"
           οnclick="updateClick(${articleInfo.id})" />
         </td>
        </tr>
       </c:forEach>
       <!--迭代内容输出结束 -->
       <!-- 插入新闻 结束 -->
       <tr>
        <td colspan="10" height="15"
         background="${contextPath}/background/img/laji05.gif"
         style="background-repeat: repeat-x;background-position: bottom"></td>
       </tr>
       <tr>
        <td colspan="2">
         &nbsp;&nbsp;
         <input type="checkbox" name="checkbox" value="checkbox"
          οnclick="chkall(this)" />全选
         <input type="hidden" name="formFlag" value="3" />
         <input type="hidden" name="activeFlag" />
         <input type="hidden" name="newsId" />
         <input type="hidden" name="method" />
        </td>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值