js 处理json时间格式

对于时间类型得出结果为:/Date(1216796600500)/ 

function renderTime(data){ 
var da = eval('new ' + data.replace('/','','g').replace('/','','g')); 
return da.getFullYear()+"年"+ da.getMonth()+"月" +da.getDay()+"日" +da.getHours()+":"+da.getSeconds()+":"+da.getMinutes(); 

posted @ 2012-10-10 10:52  Jack.Y  阅读(5218)  评论(0编辑  收藏  举报