标签:
1 //获取当前时间,格式:yyyy-mm-dd hh:mm:ss 2 function getNow() { 3 var now = new Date(), 4 y = now.getFullYear(), 5 month = now.getMonth(), 6 d = now.getDate(), 7 h = now.getHours(), 8 m = now.getMinutes(), 9 s = now.getSeconds(); 10 return (y + "-" + (month + 1) + "-" + d + " " + h + ":" + m + ":" + s); 11 }
标签:
原文地址:http://www.cnblogs.com/wanshi1989/p/4240317.html