Dùng input type=“datetype”. Kiểu datetime trong HTML dùng <input type="datetime-local">. Cho phép người dùng chọn ngày và giờ. Popup chọn ngày giờ hiện khi click vào input.
<!DOCTYPE html> <html> <head> <title>HTML input datetime</title> </head> <body> <form action = "" method = "get"> Chi tiết:<br><br> Tên học sinh<br><input type = "name" name = "sname"><br> Ngày và Giờ thi<br><input type = "datetime-local" name = "datetime"><br> <input type = "submit" value = "Gửi"> </form> </body> </html>