js中日期创建

var str ='2012-08-12 23:13:15';
str = str.replace(/-/g,"/");
var date = new Date(str );
  
  
  
  
javascript Date format(js日期格式化) http://blog.csdn.net/vbangle/article/details/5643091
js中date使用例子:
http://blog.csdn.net/lousaibiao/article/details/8102607 http://www.dreamdu.com/javascript/object_date/

你可能感兴趣的:(js)