2011年12月13日

常用的javascript日期格式化

摘要: var str = '2008-11-11 11:11:09';alert(str.replace(/\s\d+:\d+:\d+$/,''));Date.prototype.format = function(format){ var o = { "M+" : this.getMonth()+1, //month "d+" : this.getDate(), //day "h+" : this.getHours(), //hour "m+" : this.getMinutes(), 阅读全文

posted @ 2011-12-13 12:10 毛毛亟亟 阅读(587) 评论(0) 推荐(0)

导航