Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JQuery$.ajaxIE8_Jquery_Ajax_Internet Explorer 8 - Fatal编程技术网

JQuery$.ajaxIE8

JQuery$.ajaxIE8,jquery,ajax,internet-explorer-8,Jquery,Ajax,Internet Explorer 8,我在获取xhr对象的responseText属性时遇到问题。 当我试图直接访问xhr变量时,我得到一个[object] $.ajax({ 'url': that.data('url'), 'async': false, 'type': 'get', 'beforeSend': function() { onBeforeSend(that); },

我在获取xhr对象的responseText属性时遇到问题。 当我试图直接访问xhr变量时,我得到一个[object]

$.ajax({
            'url': that.data('url'),
            'async': false,
            'type': 'get',
            'beforeSend': function() {
                onBeforeSend(that);
            },
            'success': function(res, req, xhr) {
                alert(xhr);
                alert(xhr.responseText);
                if ((typeof res == 'undefined') && (typeof xhr == 'undefined')) {
                    res = (function() {
                        try {
                            return new (this.XMLHttpRequest||ActiveXObject)('MSXML2.XMLHTTP.3.0');
                        } catch (e) {
                            alert('Exception');
                        }
                    });
                }
                container.html(res.responseText);
            },
            'error': function(res, xhr) {
                container.html(res.responseText);
            },
            'complete': function() {
                onComplete(that);
            }
        });
这个问题在安装了XP操作系统的IE-8中暴露出来。
请任何人帮助我。

尝试将
dataType
属性添加到选项中,它可以
html、JSON、xml或文本

jQuery的ajax在IE8中应该可以正常工作,那么为什么frack要这样做呢?以防万一。也许我需要反复发送请求?有什么想法吗?