form 表单提交 javamvc框架下 jsp怎么提交表单数据 controller层怎么接受数据 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <input type="submit" value="保存" class="tool-button round-corner-5 saveBtn" onclick="click()" id = "formsubmit" /><script type="text/javascript"> function click(){ $.ajax({ type: "post", url:"/save/point/save", //发送请求 dataType: "json", data: $('#form').serialize(), contentType: "application/json;charset=UTF-8", success: function(result){ } }) } </script> @Controller@RequestMapping(value ="/save/point")public class PointController { @Autowired private LjflPointAddService ljflPointAddService; @RequestMapping(value="/save", method=RequestMethod.POST) private String doSave(HttpServletRequest request,Ljflworkpointtemp temp) { String code = request.getParameter("fCode"); String name = request.getParameter("fName"); System.out.println(code); System.out.println(name); return "success";} @RequestParam("fCode") String aaa,@RequestParam("fName") String bbb 我 form 表单里的name字段跟实体类是一样的 pager-taglib 的使用问题 jacob 操作word文档问题,在线等候您的解答! Java调用.Net发布的webservice poi 怎么就导出130条记录? frame框架北京的问题 sql问题 急!各位大哥帮忙看一下。web 为什么从文本文件中读取的中文保存到SQLServer2000数据库中会产生乱码? 急:我用JB9编译smartUpload时提示javax.servlet不存在等错误,为什么? iframe的问题 main方法可以正常调用,jsp调用出现java.lang.NullPointerException 求解:学习 Spring时,Tomcat 启动出现问题
function click(){
$.ajax({
type: "post",
url:"/save/point/save", //发送请求
dataType: "json",
data: $('#form').serialize(),
contentType: "application/json;charset=UTF-8",
success: function(result){
}
})
}
</script> @Controller
@RequestMapping(value ="/save/point")
public class PointController { @Autowired
private LjflPointAddService ljflPointAddService;
@RequestMapping(value="/save", method=RequestMethod.POST)
private String doSave(HttpServletRequest request,Ljflworkpointtemp temp)
{
String code = request.getParameter("fCode");
String name = request.getParameter("fName");
System.out.println(code);
System.out.println(name);
return "success";
}