• lingerUI二级联动 skyCc


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ahzytxSafeRep.View.safeReport.Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>安全报表上报</title>
            <link href="http://www.cnblogs.com/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
              <link href="http://www.cnblogs.com/lib/ligerUI/skins/Silvery/css/ligerui-form.css" rel="stylesheet"
            type="text/css" />
        <script src="http://www.cnblogs.com/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
      <script src="http://www.cnblogs.com/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
        <script src="http://www.cnblogs.com/lib/ligerUI/js/ligerui.min.js" type="text/javascript"></script>

        <script src="http://www.cnblogs.com/lib/jquery-validation/jquery.validate.min.js" type="text/javascript"></script>
        <script src="http://www.cnblogs.com/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
        <script src="http://www.cnblogs.com/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
        <script src="http://www.cnblogs.com/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
         <script src="http://www.cnblogs.com/lib/ligerUI/js/plugins/ligerLayout.js" type="text/javascript"></script>
             <script src="http://www.cnblogs.com/lib/ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>

        <script src="http://www.cnblogs.com/lib/json2.js" type="text/javascript"></script>
     
    <script type="text/javascript">
        var cmb1, cmb2;
        $(function() {
              $("form").ligerForm();
             $("#txtDate").ligerDateEditor();

            cmb1 = $("#cmb1").ligerComboBox({ data: null, textField: "dept_name", valueField: "dept_code", isMultiSelect: false, onSelected: function(newvalue) { setdata(cmb2, "../Ajax/ajaxSelDept.ashx?act=selDeptNew&deptCode=" + newvalue); } });
            cmb2 = $("#cmb2").ligerComboBox({ data: null, textField: "dept_name", valueField: "dept_code", isMultiSelect: false });
            setdata(cmb1, "../Ajax/ajaxSelDept.ashx?act=selDept"); //页面加载时,先加载cmb1的值                           
        });

        function setdata(obj, url) {
            $.getJSON(url + "&r=" + Math.round(Math.random() * 1000000).toString(),
                         function(json) {
                             obj.setData(json); //把json塞到下拉框里面去
                             //            $("#txtjson").val(JSON2.stringify(json));
                         }
                       );
        }

        function getid() {
            $.ligerDialog.success($("#cmb1_val").val() + "_" + $("#cmb2_val").val() + "<br/><br/>" +
                $("#cmb1").val() + "_" + $("#cmb2").val()
           ); //下拉框取后台id的用法,每个ligerui的下拉框会创建一个id_val的hidden用来存放id 
        }      
     
          function f_submit() {
              var form = document.forms[0];
              var selCity =$("#test1").val();;
             
              var selTown = $("#test2").val();;
              var txtDate = document.getElementById("txtDate").value;
              if (selCity == "") {

                  alert("城市不能为空");
                  return false;

              }
              if (selTown== "") {

                  alert("县公司不能为空");
                  return false;

              }
              if (txtDate == "") {

                  alert("时间不能为空");
                  return false;

              }
              else {
               
                  form.submit();
              }
         
         
          }

    </script>
         <style type="text/css">

                body{ padding:5px; margin:0; padding-bottom:15px;}
                #layout1{  100%;margin:0; padding:0;  } 
                .l-page-top{ height:50px; background:#f8f8f8; margin-bottom:3px;}
                h4{ margin:20px;}
               
             .l-table-edit {}
             .l-table-edit-td{ padding:4px;}
            .l-button-submit,.l-button-reset{80px; float:left; margin-left:10px; padding-bottom:2px;}
            .l-verify-tip{ left:230px; top:120px;}

                    </style>

    </head>
    <body style="padding:6px; ">
     <div class="l-page-top">
         <form name="form1" method="post" id="form1" action="addSafeReport.aspx?flag=1" target="home">

    <table cellpadding="1" cellspacing="1">

    <tr >
    <td>选择地市</td>
    <td width="30px">

      <input type="text" id="cmb1"/>
     </td>
     <td >选择县公司</td>
     <td width="30px">
       <input type="text" id="cmb2"/>
     </td>
     
     <td align="right" >归属日期</td>
     <td class="l-table-edit-td">
      <input type="text" id="txtDate" width="30px" />
     </td>
     <td  colspan="1" align="right">
        <input id="btnOK" type="button" value="添加" onclick="f_submit()"  class="l-button l-button-submit"/>
     </td>
     <td colspan="1" align="left">
     <input type="reset" value="重置" class="l-button l-button-reset"/>
    </td>
    </tr>
    </table>
    </form>
    </div>
       <div id="layout1">
                 <div position="center" title="标题" >
                 <iframe frameborder="0" name="home" src="addSafeReport.aspx" width="100%" height="380px"></iframe>
                </div> 
            </div>
      <div style="display:none;">
    </div>
    </body>
    </html>

  • 相关阅读:
    vs code快捷键
    封装一个运动函数
    关于数组操作方式的总结
    学习html/css基础的重点笔记
    web新手——新闻列表这样写不容易出错
    AppCan——生成Web/微信App版,调用微信JSAPI支付方式,提示WeixinJSBridge内置对象undefined
    vue slot 占位符
    vue /deep/ css 不用1级1级找了
    vue 双向绑定 2个{{}}
    axios 请求接口 f12可以返回值 但是控制台打印报错
  • 原文地址:https://www.cnblogs.com/cmzcheng/p/2281582.html
Copyright © 2020-2023  润新知