ext前台接收action传过来的json数据示例_extjs
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了ext前台接收action传过来的json数据示例_extjs,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1595字,纯文字阅读大概需要3分钟。
内容图文
![ext前台接收action传过来的json数据示例_extjs](/upload/InfoBanner/zyjiaocheng/322/dbe7d69e99da4214acdb64854c537d9d.jpg)
![ext前台接收action传过来的json数据示例_extjs - 文章图片](/upload/getfiles/0001/2021/4/22/20210422105047094.jpg)
Ext.Ajax.request({
method:'POST',//请求方式
params : {dagl_code:dagl_code},
url:lcwPath+"/daxt/lcgl.shtml?method=getJgBycode",//请求的url地址
success: function(response, opts) {
if(response.responseText!='{}'){
alert(response.responseText);
//第一种方法
var dagl_jg = Ext.util.JSON.decode(response.responseText).dagl_jg;
//第二种方法
var json = eval("(" + re.responseText + ")");
var dagl_jg= json.dagl_jg;
var org_mc = Ext.util.JSON.decode(response.responseText).org_mc;
var lccode = Ext.util.JSON.decode(response.responseText).lccode;
var lcname = Ext.util.JSON.decode(response.responseText).lcname;
Ext.getCmp("jgs").comboHidden.setValue(dagl_jg);
Ext.getCmp('jgs').setValue(org_mc);
Ext.getCmp('dagl_jg').setValue(dagl_jg);
Ext.getCmp('sslc').setValue(lccode);
Ext.getCmp('sslc').setRawValue(lcname);
var dagl_jg = Ext.getCmp('jgs').comboHidden.getValue();
lcStore.proxy = new Ext.data.HttpProxy({url: lcwPath + '/daxt/lcgl.shtml?method=getDaxx&dagl_type=L&dagl_jg=' + dagl_jg});
lcStore.load();
Ext.getCmp('lcbh').setValue('');
}else{//值没有,清空信息
Ext.MessageBox.show({
title:'提示',
msg:config.string.NOTNUMBERMSG_OR_NUMBERLOSEEFFICACY,
minWidth:270,
icon:Ext.MessageBox.WARNING,
buttons:{"ok":"关闭"},
fn:function(e){Ext.MessageBox.hide();},
closable:true
});
Ext.getCmp("jgs").setValue("");
Ext.getCmp("lcbh").setValue("");
}
},
failure: function(response, opts) {
Ext.MessageBox.show({
title:'系统提示',
msg:'系统出现非预期异常',
minWidth:270,
icon:Ext.MessageBox.WARNING,
buttons:{"ok":"关闭"},
fn:function(e){Ext.MessageBox.hide();},
closable:true
});
}
});
内容总结
以上是互联网集市为您收集整理的ext前台接收action传过来的json数据示例_extjs全部内容,希望文章能够帮你解决ext前台接收action传过来的json数据示例_extjs所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。