已采纳回答 / 阿尔滨必胜
我觉得你在document.getElementById(show)这少加了一个双引号应该改成:document.getElementById("show").innerHTML=XXXXXXX
2015-08-17
已采纳回答 / 慕哥7564850
window.onload = function(){showTime();}function checkTime(i){if (i<10) {i="0" + i} return i}function showTime(){var now=new Date();var year=now.getFullYear();var month=now.getMonth()+1;var day=now.getDate();var h=now.getHours();var m=now.getMinutes(...
2015-08-06
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