Show Output
<!DOCTYPE html> <html lang="en"> <head> <title>HTML5 Time Input Type</title> <script> function getValue() { var time = document.getElementById("mytime").value; alert(time); } </script> </head> <body> <form> <label for="mytime">Select Time:</label> <input type="time" id="mytime"> <button type="button" onclick="getValue();">Get Value</button> </form> </body> </html>