IE not displaying ajax call results from database
question says it all... code:
$(document).ready(function() {
dataToLoad = 'showr开发者_运维问答esults=true';
$.ajax({
type: 'post',
url: 'submit.php',
datatype: 'html',
data: dataToLoad,
async: true,
success: function(data){
$('#results').html(data);
},
});
});
You should use
dataType: 'html'
instead of
datatype: 'html'
and remove the trailing comma at the end (IE<=7 will throw error)
If the problem persists, add an error callback to see if there's an error
error: function(xhr, status, errorThrown){
alert("Error:\n" + status);
}
Hope this helps. Cheers
加载中,请稍侯......
精彩评论