• 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');
                    }
                }]
            });
    
        }
    
  • 相关阅读:
    ASP.NET vs MVC vs WebForms
    asp.net web forms和asp.net mvc比较
    cxx11emu.h 和 logprint.h
    获取代码中宏定义等信息的一些手段
    openwrt luci web分析
    QSDK与OPENWRT区别
    OpenWrt 中查看 Flash RAM CPU 信息
    深入剖析Linux IO原理和几种零拷贝机制的实现
    Linux ass2srt
    bsd pkg install gcc gmake cmake gdb cgdb
  • 原文地址:https://www.cnblogs.com/gwazy/p/9852631.html
Copyright © 2020-2023  润新知