我正在使用 Entity Framework 和 MVC3, 我在 View 中使用了以下 Jscript。
此脚本在 Crome 浏览器中运行完美,但在 Firefox 浏览器(v 15.0.1)... 该怎么办 ?
<script type="text/javascript">
$(document).ready(function () {
$('.RemarkBox').hide();
$('a.addremark').click(function () {
var url="@Html.Raw(Url.Action("ShowCommentBox", "Comment", new { Id = "idValue", EntityType = "Location" }))";
url=url.replace("idValue",event.target.id);
$('.RemarkBox').load(url);
$(this).closest('div').find('div.RemarkBox').slideToggle();
return false;
});
});
</script>
最佳答案
将事件参数放在arguments中,即:
$('a.addremark').click(function (event) {
关于javascript - 脚本在 Chrome 中运行但不在 firefox 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12725960/