摘要: Controller:@RequestMapping("/addUser")public String addUser(User user){ ...}Model:public class User { private Integer id; private String username; private String password; private String realname; private String sex; @DateTimeFormat(pattern="yyyy-MM-dd") private Date birthday... 阅读全文
posted @ 2014-04-05 17:47 炫舞十风 阅读(404) 评论(0) 推荐(0) 编辑
摘要: function dayDiffer(startDate,endDate){ console.info((endDate.getTime - startDate.getTime())/(24*60*60*1000)); return Math.floor((endDate.getTime() - startDate.getTime())/(24*60*60*1000));} 阅读全文
posted @ 2014-04-05 17:41 炫舞十风 阅读(176) 评论(0) 推荐(0) 编辑
摘要: function formatDate(date){ var year=date.getFullYear(); var month=date.getMonth()+1; var date=date.getDate(); if(month<=9){ month = "0"+month;//月以两位数显示 } if(date<=9){ date = "0"+date; //日以两位数显示 } return year+"-"+month+"-"+date; } 日期格式:1991... 阅读全文
posted @ 2014-04-05 17:40 炫舞十风 阅读(183) 评论(0) 推荐(0) 编辑
摘要: function serializeObject(form){ var o = {}; $.each(form.serializeArray(),function(index){ o[this['name']] = this['value']; }); return o;} 阅读全文
posted @ 2014-04-05 17:37 炫舞十风 阅读(195) 评论(0) 推荐(0) 编辑