• 设为首页
  • 收藏本站
  • 积分充值
  • VIP赞助
  • 手机版
  • 微博
  • 微信
    微信公众号 添加方式:
    1:搜索微信号(888888
    2:扫描左侧二维码
  • 快捷导航
    福建二哥 门户 查看主题

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

    发布者: 琛瑞6678 | 发布时间: 2025-8-13 21:06| 查看数: 101| 评论数: 0|帖子模式

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



    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);
    <span style="BACKGROUND-COLOR: #ffcc99">//第一种方法
    var dagl_jg = Ext.util.JSON.decode(response.responseText).dagl_jg;
    //第二种方法
    var json = eval("(" + re.responseText + ")");
    var dagl_jg= json.dagl_jg;
    </span>
    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
    });
    }

    });

    来源:互联网
    免责声明:如果侵犯了您的权益,请联系站长(1277306191@qq.com),我们会及时删除侵权内容,谢谢合作!

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    ×

    最新评论

    QQ Archiver 手机版 小黑屋 福建二哥 ( 闽ICP备2022004717号|闽公网安备35052402000345号 )

    Powered by Discuz! X3.5 © 2001-2023

    快速回复 返回顶部 返回列表