我在MVC4网站上有一个使用
的表格@using (Ajax.BeginForm("Action","Controller", new AjaxOptions { HttpMethod = "POST", InsertionMode = InsertionMode.Replace, UpdateTargetId = "Results", OnSuccess = "OnSuccess" }))
{
HTML....
}
<div id="Results"></div>
在同一页面中我的剧本:
function OnSuccess() {
alert("Ok");
Do More things...
}
一切正常(Chrome,FF ......)不在IE中(我使用的是IE10)。该脚本工作并显示警报,但内容未呈现。如果我点击页面然后IE刷新它并显示内容。
有什么想法吗?
提前致谢!
答案 0 :(得分:0)
只需将insertionMode更改为InsertAfter即可立即使用