前台js
$("#nickForm").ajaxSubmit({
type: "post",
url: "http://localhost:8080/test/myspace.do?method=updateNick¶m=1",
dataType: "json",
success: function(result){
//返回提示信息
alert(result.nickMsg);
}
});
action的配置
<result type="json">
<param name="root">resultMap</param>
</result>

本文介绍了一种使用前端JavaScript和Ajax技术实现昵称更新的方法。具体展示了如何通过jQuery库发送POST请求到指定URL,并接收JSON格式的反馈信息。
1817

被折叠的 条评论
为什么被折叠?



