Asp.net mvc ajax调用成功后重新加载页面会导致safari和IE浏览器出错
我使用了ajax调用来插入数据。如果ajax调用成功,我想重新加载页面,所以我在ajax调用中编码为:Asp.net mvc ajax调用成功后重新加载页面会导致safari和IE浏览器出错,asp.net-mvc,jquery,asp.net-ajax,Asp.net Mvc,Jquery,Asp.net Ajax,我使用了ajax调用来插入数据。如果ajax调用成功,我想重新加载页面,所以我在ajax调用中编码为: myfunction: function (url, form) { $.ajax({ cache: false, url: url, data: $(form).serialize(), type: 'post', success: window.location.reload(true),
myfunction: function (url, form) {
$.ajax({
cache: false,
url: url,
data: $(form).serialize(),
type: 'post',
success: window.location.reload(true),
complete: this.resetLoadWaiting,
error: "Failer Message."
});
},
这将在mozila firefox和google crome上正常工作,但在IE for all版本和safari浏览器上不起作用,它将给出失败消息,如ajax调用的错误部分所示。
那么,在成功事件中我能做些什么呢
请帮帮我
谢谢 我在成功事件中使用了
document.location.reload()
,可在所有浏览器上运行。我在成功事件中使用了document.location.reload()
,可在所有浏览器上运行。document.location.reload(true)document.location.reload(true)