ajax如下:
$.post("${pageContext.request.contextPath}/deptHead_assign.action",{"studentId":student.id,"subjectId":selectedRows[0].subjectId},function(result){alert(result.num);$.messager.alert("系统提示","落选学生<font color=red>"+student.name+"</font>已指派题目!");$("#dlg").dialog("close");},"Json");
回调函数不执行的原因可能是:
执行返回json类型,后台传过来的不是json字符串,所以不执行.
后台传过来的参数一定要和指定返回的参数类型一致,不然就将json改为text类型
Jquery ajax回调函数不执行
原文地址:https://www.cnblogs.com/goxcheer/p/9093762.html