Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/422.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
Javascript JQuery ajaxForm插件“xhr.responseText”只返回Internet Explorer中的“body”部分_Javascript_Jquery_Ajaxform - Fatal编程技术网

Javascript JQuery ajaxForm插件“xhr.responseText”只返回Internet Explorer中的“body”部分

Javascript JQuery ajaxForm插件“xhr.responseText”只返回Internet Explorer中的“body”部分,javascript,jquery,ajaxform,Javascript,Jquery,Ajaxform,在使用插件提交表单后尝试使用Jquery加载页面,尽管它在Chrome和Firefox中可以正常工作,但在Internet Explorer中,xhr.responseText变量只返回响应网页部分的内容,而不返回带有head、script、css的整个页面,有人知道为什么以及如何解决这个问题吗 $('form').ajaxForm({ beforeSend: function() { }, uploadProgress: function(event, position, total, per

在使用插件提交表单后尝试使用Jquery加载页面,尽管它在Chrome和Firefox中可以正常工作,但在Internet Explorer中,xhr.responseText变量只返回响应网页部分的内容,而不返回带有head、script、css的整个页面,有人知道为什么以及如何解决这个问题吗

$('form').ajaxForm({
beforeSend: function() {
},
uploadProgress: function(event, position, total, percentComplete) {
},
    complete: function(xhr) {
        alert(xhr.responseText); //this is just to see what's inside the xhr.responseText...
    }

}); 

编辑:好的,我解决了部分问题-只有当表单编码为enctype='multipart/form data'和/或只有在Internet Explorer中才有和时,才会出现这种情况,但我仍然不知道如何使其适用于这些类型的表单….

您使用的jquery/plugins的哪个版本。回调是'complete'不成功:function{}?@ai.farfa-JQuery v1.7.1,你所说的回调是'complete'是什么意思?-'complete是我在上面的代码中写的。.好的,我已经解决了部分问题-只有当表单被编码为enctype='multipart/form data'和/或它在IE中有一个,但仍然不知道如何使它适用于这些类型的表单。。。。