Hi,
If current time 9:04 my source load 9:4. how add 0 before minuters (0-9)
example:
<body onload="populateTime()">
<form id="form1" runat="server">
<div>
<script>
function populateTime() {
var time = new Date();
hours = document.getElementById("hours");
minutes = document.getElementById("minutes");
for (var h = 0; h < 24; h++) {
hours.options[h] = new Option(h, h);
}
hours[time.getHours()].setAttribute("selected", "selected");
for (var m = 0; m < 60; m++) {
minutes.options[m] = new Option(m, m);
}
minutes[time.getMinutes()].setAttribute("selected", "selected");
}
</script>
<select id="hours" name="_hours" style="width: 40px"></select>
<select id="minutes" name="_minutes" style="width: 40px"></select>
</div>
</form>
</body>