jQuery技术:Internet Explorer中的AJAX问题

这适用于FF,safari,chrome和opera,但不适用于IE。

错误代码是403

var datau = "trends.php%3Frastgele%3D33"; $.ajax({ type: "GET", url: "loader.php?kk=1&page="+datau, data: "", cache: false, success: function (html) { $('#content').empty(); $('#content').html(html); }, error:function (xhr, ajaxOptions, thrownError){ alert(xhr.status); alert(thrownError); } }); 

    您现在应该通过url传递GET变量。 建议采用以下方法(不要做urlencode):

    需要了解更多jQuery教程分享Internet Explorer中的AJAX问题,都可以关注jQuery技术分享栏目—计算机技术网(www.ctvol.com)!

      $.ajax({ type: "GET", url: "loader.php", data: {"kk": 1, "page": 'trends.php?rastgele=33'}, cache: false, success: function (html) { $('#content').empty(); $('#content').html(html); }, error:function (xhr, ajaxOptions, thrownError){ alert(xhr.status); alert(thrownError); } }); 

      以上就是jQuery教程分享Internet Explorer中的AJAX问题相关内容,想了解更多jQuery开发(异常处理)及jQuery教程关注计算机技术网(www.ctvol.com)!)。

      本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

      ctvol管理联系方式QQ:251552304

      本文章地址:https://www.ctvol.com/jquerytutorial/982226.html

      (0)
      上一篇 2021年12月13日
      下一篇 2021年12月13日

      精彩推荐