摘要:
使用的微软的Json序列化库那么date会是/Date(1224043200000)/ 有效的做法是mydate.replace(/\/Date\((.*?)\)\//gi, "new Date($1)"); 如果要转换格式,最好写个扩展方法:Date.prototype.pattern=function(fmt) { var o = { "M+" : this.getMonth()+1, //月份 "d+" : this.getDate(), //日 "h+" : this.getHours()... 阅读全文