zoukankan      html  css  js  c++  java
  • 表单字典

                <li>
                    车间:<select name="memberRoom" th:with="type=${@dict.getType('team_member_room')}">
                    <option value="">所有</option>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                  </select>
                  </li>


     <select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>

    ___________________________状态
                    <div class="col-sm-8">
                        <label class="toggle-switch switch-solid">
                            <input type="checkbox" id="status" checked>
                            <span></span>
                        </label>
                    </div>

      <div class="col-sm-8">
        <label class="toggle-switch switch-solid">
          <input type="checkbox" id="status" th:checked="${user.status == '0' ? true : false}">
          <span></span>
        </label>
      </div>
    ___________________________提交
       function submitHandler() {
                if ($.validate.form()) {
                    var data = $("#form-user-edit").serializeArray();
                    var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
                    data.push({"name": "status", "value": status});
                    $.operate.saveTab(prefix + "/edit", data);
                }
            }

            function submitHandler() {
                if ($.validate.form()) {
                    var data = $("#form-user-edit").serializeArray();
                    var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
                    var roleIds = $.form.selectCheckeds("role");
                    var postIds = $.form.selectSelects("post");
                    data.push({"name": "status", "value": status});
                    data.push({"name": "roleIds", "value": roleIds});
                    data.push({"name": "postIds", "value": postIds});
                    $.operate.saveTab(prefix + "/edit", data);
                }
            }

  • 相关阅读:
    【WIN10】我的第一個WIN10-UWP應用——古文觀止
    【WIN10】文本圖標
    【WIN10】VisualStateManager使用說明
    【WIN10】Storyboard動畫板
    【WIN10】Bind、Binding與Converter的使用
    struts执行过程
    在jsp中的局部和全局变量
    jsp页面中的:<%@ page contentType="text/html; charset=utf-8" language="java"%>的作用及含义
    jsp中的this
    在Java接口中怎样访问定义的常量呢?
  • 原文地址:https://www.cnblogs.com/csjoz/p/15247255.html
Copyright © 2011-2022 走看看