在 IE 8 及更高版本中,它需要刷新页面才能显示成功数据。在其他浏览器中,此功能正常工作但在 IE 中查看更新的数据需要重新加载页面
代码:
$('#ajaxEmpData').on('submit', function (e) {
if (e.preventDefault) {
e.preventDefault();
} else {
e.returnValue = true;
}
$.ajax({
type: 'post',
url: '/candidate/emp',
data: $('#ajaxEmpData').serialize(),
error:function(request,status,error) {
alert(status);
document.getElementById('load').style.visibility = "hidden";
},
beforeSend:function(){
document.getElementById('load').style.visibility = "visible";
},
success: function (data) {
$('body').html(data);
}
});
});