weixin_33711647 2014-05-23 15:13 采纳率: 0%
浏览 12

Ajax的jQuery不在IE中发布

I have a problem with post data in jquery

This is my code:

$.ajax({
    cache: false,
    type: "POST",
    url: '<?=base_url();?>cart/add_product1',
    async: false,
    data: {
        job_id: item.job_id,
        quantity: item.quantity,
        price: item.price,
        media_code: item.media_code,
        product_id: item.layout_code,
        product_name: item.product_name,
        reedit_url: item.reedit_url,
        thumb_url: item.thumb_url
    },
    success: function (response, textStatus, jqXHR) {
        console.log('done!');
    },
    error: function (jqXHR, textStatus, errorThrown) {
        console.log("The following error occured: " + textStatus, errorThrown);
    }
})

I tried many thing, like add cache: flase, and added timestamp to the link but the problem is still

The code is work good in the other browsers

The code for the add_product1 function is:

public function add_product1 ()
{
    print_r($_POST);    
}

But the result is : Array()

Your help please

Thank you

  • 写回答

2条回答 默认 最新

  • weixin_33725272 2014-05-23 15:43
    关注

    Can you try this

     data: {
            "job_id": item.job_id,
            "quantity": item.quantity,
            "price": item.price,
            "media_code": item.media_code,
            "product_id": item.layout_code,
            "product_name": item.product_name,
            "reedit_url": item.reedit_url,
            "thumb_url": item.thumb_url
        },
    

    Not really sure if this is the problem but it might be an IE quirk

    评论

报告相同问题?

悬赏问题

  • ¥15 is not in the mmseg::model registry。报错,模型注册表找不到自定义模块。
  • ¥15 安装quartus II18.1时弹出此error,怎么解决?
  • ¥15 keil官网下载psn序列号在哪
  • ¥15 想用adb命令做一个通话软件,播放录音
  • ¥30 Pytorch深度学习服务器跑不通问题解决?
  • ¥15 部分客户订单定位有误的问题
  • ¥15 如何在maya程序中利用python编写领子和褶裥的模型的方法
  • ¥15 Bug traq 数据包 大概什么价
  • ¥15 在anaconda上pytorch和paddle paddle下载报错
  • ¥25 自动填写QQ腾讯文档收集表