weixin_33712881 2016-05-31 11:46 采纳率: 0%
浏览 32

IE中的AJAX问题

I'm using a couple of ajax requests to:

a) Repeatedly (indirectly) call a php function:

function refresh_handler() {
                $.ajaxSetup({ cache: false});
    function refresh() {
        $.post('myPHP.php', null, function(data, textStatus) {
           $("body").html(data);
        });
    }
    setTimeout(refresh, 5000);
}

$(document).ready(refresh_handler); 

b) Get some SQL done (in a separate file to handle lots of jquery):

$.post('validate.php', {phpArray: arr}, function(data){
    $('#result').html(data);
  }); 

Works perfectly fine in Chrome but not in IE11.

Have tried $.ajaxSetup({ cache: false}); and <meta http-equiv="X-UA-Compatible" content="IE=9"> But it doesn't make any difference.

Weird thing is that IE acknowledge the meta tag when I check the emulation tab / document mode, and it gets set to the version I specify, but it doesn't make any difference. When I manually change it (both IE8 and 9) page is displayed properly though. What's going on?

  • 写回答

1条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 使用自定义的类型代替内置类型可行吗
      • ¥15 关于STM32的SPI和ENDAT接口编码器通信的问题
      • ¥15 关于#pdfbox#生成的PDF文件正常,转图片中文乱码的问题,如何解决?
      • ¥15 ADS中有关DAC控件的使用问题
      • ¥15 win11如何运行geoserver
      • ¥15 审稿意见请教-用ERNIE进行小样本分类的对比实验问题
      • ¥15 gem5搭建arm v8
      • ¥15 安卓时间管理APP,怎么做
      • ¥15 这段有什么bug 为什么总报错
      • ¥15 Intel Realsense深度相机(D415/D435)拍摄梯子获取梯子点云