JavaScript添加到目前为止的前导零
var MyDate = new Date();var MyDateString = new Date();MyDate.setDate(MyDate.getDate()+10);MyDateString = MyDate.getDate() + '/' + (MyDate.getMonth()+1) + '/' + MyDate.getFullYear();
if (MyDate.getMonth < 10)getMonth = '0' + getMonth;
if (MyDate.getDate <10)get.Date = '0' + getDate;
森林海
开满天机