【发布时间】:2014-04-28 18:49:58
【问题描述】:
这显示 1-24 小时我需要 1-12 小时显示我该怎么做?
function onbodyLoad (){
var now = new Date();
var hr = now.getHours();
var min = now.getMinutes();
var sec = now.getSeconds();
document.getElementById('clockDisplay').innerHTML
= "Time is " + hr + ":" + min + ":" + sec;
setTimeout('onbodyLoad()', 500);
}
【问题讨论】:
-
请不要将您的问题发送到 meta 等。
标签: javascript