javascript字符串转日期

var str ='2012-08-12 23:13:15';
str = str.replace(/-/g,"/");
var date = new Date(str );

你可能感兴趣的:(Web前端,javascript)