JavaScript将字符串转换成日期的方法: var s = "2009-06-22 09:41:30"; var d = new Date(Date.parse(s.replace(/-/g, "/")));