可以为Date原型添加如下的方法:. Date.prototype.format = function(fmt) { var o = { "M+" : this.getMonth()+1, //月份 "d+" : this.
確定! 回上一頁