location.reload()在IE中抛出重试/取消提示

时间:2016-01-07 12:38:17

标签: json ajax asp.net-mvc

$.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个正在丢失帖子数据。

0 个答案:

没有答案