ExtJS中Ext.Ajax.request与form.getForm().submit()返回值获取
1. Ext.Ajax.request
Ext.Ajax.request({ url: '../xxx', method:"POST", params: {paramName: paramValue}, success: function(resp,opts){ //返回的对象Ext.util.JSON.decode(request.responseText) var respText = Ext.util.JSON.decode(resp.responseText); var msg= respText.msg; Ext.MessageBox.alert('提示', msg); }, failure: function(resp,opts){ //返回的对象Ext.util.JSON.decode(request.responseText) var respText = Ext.util.JSON.decode(resp.responseText); var msg= respText.msg; Ext.MessageBox.alert('提示', msg); } });
2. form.getForm().submit()
this.formPanel.getForm().submit({ waitTitle: "请稍候", waitMsg : '提交数据,请稍候...', success: function() { myDialog.hide(); store.reload(); }, failure: function(form, action) { Ext.MessageBox.alert('提示', action.result.msg); return; }, scope: this });
相关推荐
InJavaWeTrust 2020-05-15
Chydar 2012-09-20
natejeams 2020-01-15
zcpHappy 2014-01-11
pythonclass 2019-11-07
JF0 2019-11-03
ElementW 2015-02-15
干货集合 2014-05-14
kaiya0 2012-06-13
cscscssjsp 2012-03-05
drinow 2019-07-12
coderMozart 2019-06-30
t0ckh 2012-11-11
中等偏下 2017-02-22
nicepainkiller 2016-07-26
xiaoren 2016-02-10
云帆大数据 2016-01-11