i wanted to input time duration in hh:mm:ss format (example - 01:23:45) in html , pls suggest me the best method. Thanks in advance
How is it possible in html ? is there any direct input type available for that ? Please help !!
i wanted to input time duration in hh:mm:ss format (example - 01:23:45) in html , pls suggest me the best method. Thanks in advance
How is it possible in html ? is there any direct input type available for that ? Please help !!
You can use the default time tag in the html as below
<time>10:00</time>
or if you want to input time using input tag and setting type to time
<input type="time" name="time" />
Here you go check below code
<!DOCTYPE html>
<html>
<body>
Time: <input type="time" id="Time" value="01:23:45">
<button onclick="myFunction()">Click to see the selected time</button>
<p id="SeeTime"></p>
<script>
function myFunction() {
var x = document.getElementById("Time").value;
document.getElementById("SeeTime").innerHTML = x;
}
</script>
</body>
</html>