如題: ...
如題:
function nowtime(){//將當前時間轉換成yyyymmdd格式 var mydate = new Date(); var str = "" + mydate.getFullYear(); var mm = mydate.getMonth()+1 if(mydate.getMonth()>9){ str += mm; } else{ str += "0" + mm; } if(mydate.getDate()>9){ str += mydate.getDate(); } else{ str += "0" + mydate.getDate(); } return str; }