zoukankan      html  css  js  c++  java
  • xxx

    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@include file="/WEB-INF/jspf/prepare.jspf" %>
    <!DOCTYPE html>

    <html>
        <head>
            <meta charset="utf-8"/>
            <%@include file="/WEB-INF/jspf/head.jspf" %>
            <title><spring:message code="application.title"/></title>
            <%-- <script type="text/javascript">
             $(function(){
                $("form").attr("onsubmit", "return checkMustInputData()");
            });
            
            function checkInputData(event, reg, errMsg) {
                if (!reg || reg.source=="^$") {
                    return true;
                }
                var control = event.target || event.srcElement;
                if (!$(control) || !$(control).val()) {
                    return true;
                }
                var testResult = reg.test($(control).val());
                if (!testResult) {
                    if (errMsg) {
                        alert(errMsg);
                    } else {
                        alert('请输入' + reg.source + '的格式的数据');
                    }
                    reg = null;
                    return false;
                }
                reg = null;
                return true;
            }

            function checkMustInputData() {
                var checkReuslt = true;
                var errMsg = '';
                $("[data-rule-required='true']").each(function(idx, el) {
                    var value = $(el).val();
                    if (!value) {
                        checkReuslt = false;
                        errMsg += $(el).data('displayName') + '不能为空 ';
                    }
                });
                if (!checkReuslt) {
                    alert(errMsg);
                    return false;
                }
                //需要同意条款
                if(!$(".btn-center [type=checkbox]").is(":checked")) {
                    alert("请先阅读条款并同意");
                    checkReuslt = false;
                }
                return checkReuslt;
            }
            </script> --%>
        </head>
        <body class="${principal.skin} ${principal.navbarFixed?'navbar-fixed':''}">
            <%@include file="/WEB-INF/jspf/body-first.jspf" %>
            
           <form class="form-horizontal validate" method="post" role="form" id="theForm">
                <table class="table table-striped table-bordered table-hover">
                    <thead>
                            <tr>
                            <td colspan="5" style="text-align: center;" class="h3 success">提交流程</td>    
                        </tr>
                        <tr>
                            <th style="4em;">序号</th>
                            <th>必须</th>
                            <th>字段</th>
                            <th>说明</th>
                            <th>输入</th>
                        </tr>
                    </thead>
                    <tbody>
                        <c:forEach items="${formData}" var="cur" varStatus="status">
                            <tr>
                                <td class="center"><input type="checkbox" name="pks" value="${cur.id}"/></td>
                                <td>${status.count}</td>
                                <td><input type="checkbox"  disabled="disabled" ${cur.mustInput? "checked":""}/></td>
                                <td>${cur.displayName }</td>
                                <td>${cur.remark }</td>
                                <td>
                                   <c:choose>
                                        <c:when test="${cur.controlType==2}">
                                        <select class="form-control input-lg" name="${cur.name }"  data-rule-required="${cur.mustInput}">
                                            <c:forEach items="${cur.tcodes }" var="item">
                                                    <option value="${item.codeName }">${item.codeName }</option>
                                            </c:forEach>
                                        </select>
                                        </c:when>
                                        <c:when test="${cur.controlType==3}">
                                            <textarea  class="form-control input-lg" name="${cur.name}" placeholder="${cur.displayValue }" data-displayName="${cur.displayName }" data-rule-required="${cur.mustInput}"
                                            onchange="return checkInputData(event, new RegExp('^${cur.inputReg}$', 'mg'), '${cur.inputCheckMsg}')">
                                            </textarea>
                                        </c:when>
                                        <c:when test="${cur.controlType==4}">
                                            <input type="file" name="${cur.name}" placeholder="${cur.displayValue }"  data-rule-required="${cur.mustInput}"  ${cur.multiple?'multiple':'' } />
                                        </c:when>
                                        <c:otherwise>
                                            <input class="form-control input-lg" type="text" name="${cur.name }" placeholder="${cur.displayValue }" data-rule-required="${cur.mustInput}"
                                            onchange="return checkInputData(event, new RegExp('^${cur.inputReg}$', 'mg'), '${cur.inputCheckMsg}')"/>
                                        </c:otherwise>
                                    </c:choose>
                                </td>
                            </tr>
                        </c:forEach>
                    </tbody>
                </table>
                <div class="clearfix form-actions">
                    <div class="btn-center" style="text-align:center;">
                       <label class="checkbox-inline">
                          <input type="checkbox"  value="1"> <a href="javascript:void(0);">同意"服务条款"和"用户须知"</a>
                       </label>
                       </div>
                    <div class="col-sm-offset-3 col-sm-9">
                        <button type="submit" class="btn btn-primary">
                            <i class="icon-ok bigger-110"></i>
                            确定提交
                        </button>

                        <button type="button" class="btn btn-info action-back">
                            <i class="icon-undo bigger-110"></i>
                            取消返回
                        </button>
                    </div>
                </div>
            </form>
        </body>
    </html>

  • 相关阅读:
    面向对象编程总结Python
    垃圾收集器与内存分配策略
    自定义异常、异常处理注意点
    关于线程【一】——线程创建、停止、interrupted()和isInterrupted()区别
    Java内存区域
    HotSpot虚拟机对象
    异常——try、catch、finally、throw、throws
    关于线程【二】——线程同步和异步
    fillder代理调试
    新鲜出炉的Asp.Net MVC电子书
  • 原文地址:https://www.cnblogs.com/xuqiudong/p/5047750.html
Copyright © 2011-2022 走看看