//格式化时间【参数是一个字符串,格式类似于 /Date(1425027069000)/ 】 function formatDate(n) { var s = n.slice(6, 21); dt = new Date(parseInt(n.slice(6, 21))); var year = dt.getFullYear();; var month = dt.getMonth() + 1; var date = dt.getDate(); var hour = dt.getHours(); var minute = dt.getMinutes(); var second = dt.getSeconds(); return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second; }