MVC 的EF框架写的代码为什么这段Ajax 的提示框不弹出来Confirm
@Ajax.ActionLink("删除","DelectTeachers",new{TeacherName=item.ID},newAjaxOptions(){Upda...
@Ajax.ActionLink("删除", "DelectTeachers", new { TeacherName = item.ID }, new AjaxOptions() { UpdateTargetId = "Teachers", HttpMethod = "Post", Confirm = "Are you sure?" })
展开
1个回答
展开全部
你是不是忘记引用jquery.js插件了?
<script src="jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="jquery.unobtrusive-ajax.min.js" type="text/javascript"></script>
@Ajax.ActionLink("删除", "DelectTeachers", new { TeacherName = item.ID }, new AjaxOptions() { UpdateTargetId = "Teachers", HttpMethod = "Post", Confirm = "Are you sure?" })
<script src="jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="jquery.unobtrusive-ajax.min.js" type="text/javascript"></script>
@Ajax.ActionLink("删除", "DelectTeachers", new { TeacherName = item.ID }, new AjaxOptions() { UpdateTargetId = "Teachers", HttpMethod = "Post", Confirm = "Are you sure?" })
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询