spring boot怎么直接返回字符串了

元芳怎么了
浏览 4737回答 1
1回答

慕尼黑的夜晚无繁华

前台页面:function ajaxPost(){$.ajax({data:{"name":$("#name").val(),"age":$("#age").val(),"sex":$("input[name='sex']:checked").val()},type:"Post",async:false, //加上这个属性就好了dataType: 'json',url:"addStudent.jsp",error:function(data){alert('添加失败!');},success:function(data){alert('添加成功!');window.location.href = 'list.jsp'}});}
打开App,查看更多内容
随时随地看视频慕课网APP