Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.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 IE不显示来自数据库的ajax调用结果_Javascript_Jquery_Ajax_Internet Explorer - Fatal编程技术网

Javascript IE不显示来自数据库的ajax调用结果

Javascript IE不显示来自数据库的ajax调用结果,javascript,jquery,ajax,internet-explorer,Javascript,Jquery,Ajax,Internet Explorer,问题说明了一切。。。代码: $(document).ready(function() { dataToLoad = 'showresults=true'; $.ajax({ type: 'post', url: 'submit.php', datatype: 'html',

问题说明了一切。。。代码:

$(document).ready(function() { dataToLoad = 'showresults=true'; $.ajax({ type: 'post', url: 'submit.php', datatype: 'html', data: dataToLoad, async: true, success: function(data){ $('#results').html(data); }, }); }); $(文档).ready(函数(){ dataToLoad='showresults=true'; $.ajax({ 键入:“post”, url:'submit.php', 数据类型:“html”, 数据:dataToLoad, async:true, 成功:功能(数据){ $('#results').html(数据); }, }); }); 你应该使用

dataType: 'html'
而不是

datatype: 'html'

并删除结尾处的逗号(i你是否提醒过你的数据?这给了你什么?在其他浏览器上提醒过ok…修复实际上是结束成功括号后的逗号)
error: function(xhr, status, errorThrown){
   alert("Error:\n" + status);
}