function
formatDate(date){
var
year=date.getFullYear();
var
month=date.getMonth()+1;
var
date=date.getDate();
if (month<=9){
month = "0" +month; //月以两位数显示
}
if (date<=9){
date = "0" +date; //日以两位数显示
}
return
year+ "-" +month+ "-" +date;
} |
日期格式:1991-01-15