根据ISO 8601编码的日期和时间(年,月,日,小时,分钟,秒,几分之一秒),时区设置为UTC。
让我们看一个例子:
<!DOCTYPE HTML> <html> <body> <form action = "/cgi-bin/html5.cgi" method = "get"> Date and Time : <input type = "datetime" name = "newinput" /> <input type = "submit" value = "submit" /> </form> </body> </html>
根据ISO 8601编码的日期和时间(年,月,日,小时,分钟,秒,几分之一秒),没有时区信息。
让我们看一个例子:
<!DOCTYPE HTML> <html> <body> <form action = "/cgi-bin/html5.cgi" method = "get"> Local Date and Time : <input type = "datetime-local" name = "newinput" /> <input type = "submit" value = "submit" /> </form> </body> </html>