$.ajax({
type: "POST",
//url: "/AdminInterface/AddPosition",
url: '@Url.Action("AddPosition", "AdminInterface")',
data: "{PosName:'" + PosText + "'}",//
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
success: function (response) {
//SuccessMsg("New Position Added.");
location.reload();
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
}
});
这里我正在刷新location.reload()
中的webgrid,但它在IE和firefox中抛出了重试/取消提示。在chrome中它工作正常。
怎么做而不会丢失帖子数据?
window.location.href = window.location.href
window.location.href = window.location.pathname + window.location.search
window.location = window.location.pathname;
最重要的是3个正在丢失帖子数据。