function timeForamt(str){
return('0'+str).slice(-2);
}
time.innerHTML=timeForamt(hours)+'时'+timeForamt(min)+'分'+timeForamt(sec)+'秒';
return('0'+str).slice(-2);
}
time.innerHTML=timeForamt(hours)+'时'+timeForamt(min)+'分'+timeForamt(sec)+'秒';
2015-07-20
var day=myDate.getDay();
demo.innerHTML='星期'+'日一二三四五六'.charAt(day);
demo.innerHTML='星期'+'日一二三四五六'.charAt(day);
2015-07-20