json数据的时间格式转换如:/Date(2342561534)/

                     var date = new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
return date.getFullYear() + "-" + month + "-" + currentDate;
posted @ 2012-02-20 15:35  biubiubiu  阅读(283)  评论(0编辑  收藏  举报