足球游戏_中国足彩网¥体育资讯$

ext前台接收action传过来的json数据示例
来源:易贤网 阅读:1505 次 日期:2014-06-18 20:58:45
温馨提示:易贤网小编为您整理了“ext前台接收action传过来的json数据示例”,方便广大网友查阅!

这篇文章以示例的方式为大家介绍了ext前台接收action传过来的json数据,需要的朋友可以参考下。

ext前台接收action传过来的json数据

1

代码如下:

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);

<spanstyle="BACKGROUND-COLOR:#ffcc99">//第一种方法

vardagl_jg=Ext.util.JSON.decode(response.responseText).dagl_jg;

//第二种方法

varjson=eval("("+re.responseText+")");

vardagl_jg=json.dagl_jg;

</span>

varorg_mc=Ext.util.JSON.decode(response.responseText).org_mc;

varlccode=Ext.util.JSON.decode(response.responseText).lccode;

varlcname=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);

vardagl_jg=Ext.getCmp('jgs').comboHidden.getValue();

lcStore.proxy=newExt.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

});

}

});

中国足彩网信息请查看IT技术专栏

中国足彩网信息请查看网络编程
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标