问题描述
view如下:@Ajax.ActionLink("text","action",new{name="ohno"},newAjaxOptions{Confirm="确定删除!",OnBegin="onbegin",OnComplete="oncomplete",OnFailure="onfailure",OnSuccess="onsuccess",HttpMethod="Post"});<scripttype="text/javascript">functiononbegin(){alert("开始啦");}functiononcomplete(request,status){alert("完成了,好下班了"+request+status);}functiononfailure(request,error){alert("报错了,要加班了"+request+error);}functiononsuccess(data){alert("改好了,走人喽");}</script>请教Controller里的action怎么写怎么才能触发onfailure并显示错误信息
解决方案
解决方案二:
这个看看:
时间: 2024-11-16 19:12:36