I want to show if time is less than 10 hours or minute or seconds
then, it time will show like "00", "01", "02","03"...
but right now it showing "0", "1", "2", "3"...
CODE:
function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
document.getElementById('label').innerHTML = h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500);
}
<body onload="startTime()">
<div id="label"></div>
</body>
check seconds