小弟試了一下。 改二四小時,加入// // Convert the hours component to 12-hour format if needed //currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours; //currentHours = ( currentHours < 10 ? "0" : "" ) + currentHours;
消去am/pm ture改為false <!-- Update the string for display of AM/PM--> if (EnableClock == false){ document.getElementById("ampm").firstChild.nodeValue = currentTimeString;