在我的asp.net主页上,我使用了一个数据表,该数据表使用“ datatables.min.js”以表格格式显示数据。在一个按钮上,单击“我正在弹出一个Jquery模态对话框”。添加新数据后,将关闭“模态”对话框,并且刷新主页面,显示新行。在Chrome,Firefox中正常运行。但是,当我使用Internet Explorer 11进行尝试时,即使页面刷新了,我也看不到新添加的行。我必须再次手动刷新页面才能看到新添加的数据行。
在我的模式对话框代码中,我使用“ window.location.href”,如下所示。
$.ajax({
type: "POST",url: "/Region/Index",data: regionFormData,success: function () {
$("#loaderDiv").hide();
$("#myModal1").modal("hide");
window.location.href = "/Region/Index";
}
});
我尝试过location.reload(true);而不是window.locatio.href
。但是它仍然无法在IE 11中正常工作。
我还尝试将Meta标签添加到母版页(_Layout.cshtml)的标题中,如下所示
<meta http-equiv="x-ua-compatible" content="IE=edge;" />
但是没有运气。 有没有办法使此工作在IE 11中进行?