HTML5输入类型的时间设置值不起作用 [英] HTML5 input type time setting values not working
本文介绍了HTML5输入类型的时间设置值不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< input type =timename =exitid =teacher-entry-exit -form-exit-inputclass =form-controlvalue =08:56 AMrequired =>
我做错了什么?
解决方案
它基于24小时制,因此AM和值使用
for PM。 value =08:56
=20:56
>
请参阅: http://www.w3.org/TR/html-markup/input.time.html
I have a form with input type time. I am trying to set values. But it is not showing. Here is my code.
<input type="time" name="exit" id="teacher-entry-exit-form-exit-input" class="form-control" value="08:56 AM" required="">
What am I doing wrong?
解决方案
It's based on 24-hour time, therefore use value="08:56"
for AM and value="20:56"
for PM.
<input type="time" value="08:56">
See: http://www.w3.org/TR/html-markup/input.time.html
这篇关于HTML5输入类型的时间设置值不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文