前台js 複製程式碼 程式碼如下: $("#nickForm") .ajaxSubmit({ type: "post", url: "http://localhost:8080/test/myspace.do?method=updateNick¶m=1", 「 🎜> success: function(result){ //返回提示訊息 後台封裝: 複製程式碼 程式碼如下:public ActionForward toUpdateNickName(ActionMapping map, ActionForm form,Reponse Hintt片> PrintWriter pw = response.getWriter(); JSONObject obj = new JSONObject(); obj.put("nickMsg", "暱稱修改成功!"); pw.print(obj); pw.close(); }