惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
博客园 - 司徒正美
罗磊的独立博客
D
Docker
Last Week in AI
Last Week in AI
爱范儿
爱范儿
M
MIT News - Artificial intelligence
V
V2EX
Google DeepMind News
Google DeepMind News
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Security Blog
Microsoft Security Blog
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
V
Visual Studio Blog
博客园 - 叶小钗
B
Blog RSS Feed
A
About on SuperTechFans
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
Martin Fowler
Martin Fowler
P
Proofpoint News Feed

博客园 - gwazy

wifi zigbee 蓝牙区别 easyUI 异步加载树 sql 有条件计数 easyui combox 手动添加项 只有设置了 name 属性的表单元素才能在提交表单时传递它们的值 除湿方法 android 页面跳转,数据回传 android studio 乱码 android studio 工具 gridlaylout 简单布局 android 开发 简单的页面布局 android sdk 重装windows7企业版时提示“安装程序无法创建新的系统分区,也无法定位现有系统 csdn 泄露用户密码害人不浅啊。 PoolMon 使用 固态硬盘相关知识 android 平台搭建 win8 中使用第三方无线网卡出现无线连接受限解决办法 iis 故障导致网站无法访问
easyui textbox 获取焦点
gwazy · 2018-10-25 · via 博客园 - gwazy
    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');
                }
            }]
        });

    }