zoukankan      html  css  js  c++  java
  • easyui textbox 获取焦点

        function Admin_ListAdd()
        {
            $('#ListInfo').css({ display: "inherit" });
            $("#Department_Name").textbox("setValue", '');
            $("#Department_Remark").textbox("setValue", '');
            $('#ListInfo input').val('');
            $('#ListInfo').dialog({
                title: '添加单位',
                buttons: [{
                    text: '确定',
                    iconCls: 'icon-ok',
                    handler: function () {
    
                        if ($("#Department_Name").val() == "") {
                            $.messager.alert('提示', '单位名称不能为空!', 'info',function () {
                                $("#Department_Name").next('span').find('input').focus();
                            });
                         
                            return;
                        }
                        if ($("#Department_Leval").combobox('getValue') == "") {
                            $.messager.alert('提示', '单位级别不能为空!', 'info', function () {
                                $("#Department_Leval").combobox('showPanel');
                            });
                            
                            return;
                        }
    
                        $.ajax({
                            type: "POST",
                            url: "/Provider/HandlerDepartment.ashx",
                            async: false,
                            data: "method=add&Department_Name=" + $("#Department_Name").val() + "&Department_Leval=" + $("#Department_Leval").combobox('getValue') + "&Department_Remark=" + $("#Department_Remark").val(),
                            success: function (msg) {
                                if (msg == '1')
                                {  $('#Admin_List').datagrid("reload"); 
                                    $('#ListInfo').dialog('close');
                                  
                                }
                                else
                                {
                                    $.messager.alert('提示', '该单位已存在!', 'info');
                                }
    
                            }
                        });
                    }
    
                }, {
                    text: '取消',
                    iconCls: 'icon-cancel',
                    handler: function () {
                        $('#ListInfo').dialog('close');
                    }
                }]
            });
    
        }
    
  • 相关阅读:
    mysql索引
    mysql视图
    pymysql
    web前端基础
    【BZOJ2002】[HNOI2010] 弹飞绵羊(大力分块)
    【BZOJ2730】[HNOI2012] 矿场搭建(找割点)
    网络流(一)——最大流
    欧拉路与欧拉回路
    扫描线(一)——求矩形面积并
    【洛谷3396】哈希冲突(大力分块)
  • 原文地址:https://www.cnblogs.com/gwazy/p/9852631.html
Copyright © 2011-2022 走看看