extjs 重复验证

来源:互联网 发布:好用的网络机顶盒软件 编辑:程序博客网 时间:2024/05/14 17:53
{   xtype: 'textfield',   fieldLabel: 'Field',   allowBlank: false,   textValid: false,   validator: function(){       return this.textValid;   },   listeners : {     'change': function(textfield,newValue,oldValue) {        Ext.Ajax.request({          url: 'psc/validate',          params: { psc: value },          scope: textfield,          success: function(response){             if (response.responseText){               this.clearInvalid();               this.textValid = true;             } else {               this.markInvalid('field is not valid');               this.textValid = false;             }                                       }        });      }          }}
如上,设置在changge时ajax去后台查询数据验证。
0 0
原创粉丝点击