author:咔咔javascript
wechat:fangkangfkhtml
方法:java
function formatDate(now) { var year = now.getFullYear(), month = now.getMonth() + 1, date = now.getDate(), hour = now.getHours(), minute = now.getMinutes(), second = now.getSeconds(); return year + "-" + month + "-" + date; }
調用:code
html+='<td>'+ formatDate(new Date(data1[i]["ue_validTime"]*1000))+'</td>';
效果:orm