标签:class yesterday bsp logs str set span settime val
var mydate = new Date(); var yester = mydate-24*60*60*1000; var yesterday = new Date(); yesterday.setTime(yester); var str = "" + yesterday.getFullYear() + "-"; if (yesterday.getMonth()>=9) { str+=(yesterday.getMonth()+1) + "-"; } else{
str +="0"+(yesterday.getMonth()+1)+"-"; } if ((yesterday.getDate())<10) { str+="0"+(yesterday.getDate()); } else{ str += (yesterday.getDate()); } $("#mydata").val(str);
标签:class yesterday bsp logs str set span settime val
原文地址:http://www.cnblogs.com/stepbystepwhx/p/7814343.html