Extjs form.submit()提交与Ext.Ajax.request的区别

前端之家收集整理的这篇文章主要介绍了Extjs form.submit()提交与Ext.Ajax.request的区别前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. Ext.Ajax.request({
  2. url:"./rehearsal/queryTableData.action",
  3. params:{
  4. search_place:rehearsal_place,250)"> search_time:dt
  5. .format('Y-m-d'),250)"> search_valuation:null,250)"> search_subject:search_subject
  6. },250)"> waitMsg:'正在提交数据',250)"> waitTitle:'提示',250)"> method:"POST",250)"> success:function(response){
  7. varrespText=Ext.util.JSON
  8. .decode(response.responseText);
  9. if(respText.success){
  10. szcdc_rehearsal_one_grid
  11. .getStore()
  12. .loadData(respText.mes);
  13. }
  14. failure:function(response){
  15. Ext.Msg.alert('提示',250)"> "操作失败:输入非法字符!!!");
  16. });
    }

  1. search_form.submit({
  2. baseParams:{
  3. search_time:search_time,250)"> search_valuation:search_valuation,250)"> search_subject:search_subject
  4. success:function(form,action){
  5. //得到数据
  6. varresult=Ext.util.JSON
  7. .decode(action.response.responseText);//就可以取出来。如果是数组,那么很简单
  8. //把数据放到结果里面
  9. szcdc_rehearsal_one_grid.getStore()
  10. .loadData(result);
  11. failure:function(form,"操作失败:输入非法字符!!!");
  12. }
  13. });
原文链接:https://www.f2er.com/ajax/162821.html

猜你在找的Ajax相关文章