引言
之前使用Servlet处理可以使用:
out.println("< script > alert('成功/失败'); Windows.location.href='跳转路径'< /script >")
SpringMVC处理
使用springmvc可以在Controller存一个标识符在map中:
map.put(“Msg”, “Ok”);
然后在前台判断即可:
<c:if test="${(param.Msg == 'Ok') }">
<script> alert("成功!");</script>
</c:if>