zoukankan      html  css  js  c++  java
  • Ext通过后台校验字段是否重复

    话不多说,直接上代码:

    handlerRybh : function(textField) {
            Ext.Ajax.request({// ajax请求的方法
                url : 'userManage/person/checkPersonByRybh.json',
                params : {
                    "rybh" : textField.getValue(),
                },
                scope:this,//使回调函数中的this变成当前的类
                success : function(res) {
                    var data = Ext.decode(res.responseText);
                    if (data.success == 'true') {
                        //do nothing
                    } else if (data.success == 'ApplicationException') {
                        Ext.getCmp('personWindow').down('#rybh').setActiveError(data.errorMsg);
                        Ext.getCmp('personWindow').down('#rybh').doComponentLayout();//显示提示信息
                    } else {
                        Ext.Msg.alert('系统错误提示', data.errorMsg);
                    }
                },
                failure : function(res) {
                    var respText = Ext.decode(res.responseText);
                    Ext.Msg.alert('系统提示', respText.error);
                },
            });
        },
  • 相关阅读:
    touch
    ls
    Linux基础
    errors
    strconv
    strings
    fmt
    os/exec
    笔记本连不上网怎么办
    笔记本连不上网怎么办
  • 原文地址:https://www.cnblogs.com/sdjnzqr/p/4291378.html
Copyright © 2011-2022 走看看