function dateToStrs(data){
var time = new Date(data);
var curYear= time.getFullYear();//年
var curMonth = time.getMonth()+1;//月
var curDay= time.getDate();//日
var curHour = time.getHours();//时
var curMinute= time.getMinutes();//分
var curMillisecond = time.getSeconds();//秒
return curYear+'-'+getzf(curMonth)+'-'+getzf(curDay)+' '+getzf(curHour)+':'+getzf(curMinute)+':'+getzf(curMillisecond);
}
//对于月份、天数小于10进行补0
function getzf(num){
if (parseInt(num) < 10) {
num = '0'+num;
}
return num;
}