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');
                    }
                }]
            });
    
        }
    
  • 相关阅读:
    IO模型
    协程
    线程
    进程总结
    HashMap和Hashtable有什么区别
    HashMap 1.7 与 1.8 的 区别,说明 1.8 做了哪些优化,如何优化的
    GC线程是否为守护线程?
    float f=3.4;是否正确?
    final、finally和finalized的区别?
    Eureka注册中心是什么?
  • 原文地址:https://www.cnblogs.com/gwazy/p/9852631.html
Copyright © 2011-2022 走看看