springMVC中的form:标签使用

2021-07-16 16:06

阅读:636

标签:bre   value   getc   head   checkbox   var   reac   style   label   

(1)modelAttribute的值是用于提交到后台的实体类对象名称

(2)form:select path的值要对应实体类的属性值

                  

                  

                  

                               

                               

  •                                  
  •                                     

                                             

                                                                                

                                        

                               

                               

  •                                  
  •                                     

                                                  

                                                  

                                                  

                                        

                               

                               

  •                                     

                                                                     title="机构" url="/sys/office/treeData?" cssClass=" required span4Tree" dataMsgRequired="必填信息"  allowClear="true"/>

                               

                               

                               

  •                                     

                                                   value="2017-06-28"

                                                   onclick="WdatePicker({dateFmt:‘yyyy-MM-dd‘});"/>

                               

                               

  •                                 ">查询

                                    ">复核通过

                                    ">复核打回

                               

                               

                      

                      

            

    (3)全选全不选和获取全选的值

    //全选/反选

          function selectAll(){

            var checkboxs = document.getElementsByName("checkbox");

            var checkall = document.getElementById("checkAll");

            if(checkall.checked){

               for(var i =0;i

                  checkboxs[i].checked = true;

               }

            }else{

               for(var j =0;j

                  checkboxs[j].checked = false;

               }

            }

          }

          //获取选中的checkbox的值

          function getCheckedValue(checkName) {

            var str = "";

            if (checkName) {

               $("input:checkbox[name=‘" + checkName +"‘]:checked").each(function() {

                  if ($(this).attr("checked")) {

                     if (str == "") {

                        str += $(this).val();

                     } else {

                        str += "," + $(this).val();

                     }

                  }

               });

            } else {

               $("input[name=type]:checkbox").each(function() {

                  if ($(this).attr("checked")) {

                     if (str == "") {

                        str += $(this).val();

                     } else {

                        str += "," + $(this).val();

                     }

                  }

               });

            }

            return str;

          }

                  td>${reportplan.planName}td>

                  td>${reportplan.templateName}td>

                  td>${reportplan.templateVersion}td>

      

                  td>

                     c:if test="${reportplan.isAuto eq ‘0‘}">手动c:if>

                     c:if test="${reportplan.isAuto eq ‘1‘}">自动c:if>

                  td>

                  td>

                     c:if test="${reportplan.frequentness eq ‘D‘}">日c:if>

                     c:if test="${reportplan.frequentness eq ‘W‘}">周c:if>

                     c:if test="${reportplan.frequentness eq ‘M‘}">月c:if>

                     c:if test="${reportplan.frequentness eq ‘J‘}">季c:if>

                     c:if test="${reportplan.frequentness eq ‘HY‘}">半年c:if>

                     c:if test="${reportplan.frequentness eq ‘Y‘}">年c:if>

                  td>

                 

                  td width="0" class="last_td" style="position:relative;">

                         div class="tr_pop_box">

                             ul>

                                

                                 li>

                                     ahref=${ctx}/reportplan/reportplan/form?planId=${reportplan.planId}title="修改">img src="${ctxStatic}/images/tr_icon_02.png" alt=""/>

    li>

                                

                                 li>

                                     a href="javascript:;" onclick="deletePlan(‘${reportplan.planId}‘)" title="删除">imgsrc="${ctxStatic}/images/tr_icon_04.png" alt=""/>

                                    

                                 li>

                             ul>

                         div>

                      td>

               tr>

            c:forEach>

          tbody>

       table>

    table id="contentTable" >

          thead>

            tr>

               th>input type="checkbox" id="checkAll"onclick="selectAll()">

               th>计划名称th>

               th>模板名称th>

               th>版本th>

               th>执行类型th>

               th>频度th>

     

            tr>

          thead>

          tbody>

      

            c:forEach items="${page.list}" var="reportplan">

                  tr class="even">

                  td>input type="checkbox" name="checkbox"value="${reportplan.planId}">

     

    springMVC中的form:标签使用

    标签:bre   value   getc   head   checkbox   var   reac   style   label   

    原文地址:https://www.cnblogs.com/yehuili/p/9533114.html


  • 评论


    亲,登录后才可以留言!