asp.net mvc - MicrosoftMvcAjax.js 在 IE8 中更新表元素时抛出 javascript 错误
在 IE8 或更早的版本中,某些元素(例如 TR 和 HTML)不支持innerHTML。 TD。不幸的是,MVC 2 项目中包含的 MicrosoftMvcAjax.js 文件使用innerHTML 作为Ajax.BeginForm 或Ajax.ActionLink 中的Ajax 更新方法。
In IE8 or anything older, innerHTML is not supported on certain elements like TR & TD. Unfortunately, the MicrosoftMvcAjax.js file included in the MVC 2 project uses innerHTML for the Ajax update method within the Ajax.BeginForm or Ajax.ActionLink.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要解决这个问题,请查看 MicrosoftMvcAjax.js 的第 18 行并将其替换为:
基本上,我取出了 innerHTML 调用并将其替换为 jQuery 的 html()。
To fix that, look into Line 18 of MicrosoftMvcAjax.js and replaced it with this:
Basically, I took out the innerHTML call and replaced it with jQuery's html().