HTML5输入类型的时间设置值不起作用 [英] HTML5 input type time setting values not working

查看:183
本文介绍了HTML5输入类型的时间设置值不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个输入类型的表单。我正在设定价值。但它没有显示。这里是我的代码。

 < input type =timename =exitid =teacher-entry-exit -form-exit-inputclass =form-controlvalue =08:56 AMrequired => 

我做错了什么?

解决方案

它基于24小时制,因此AM和值使用 value =08:56 =20:56 for PM。



>

请参阅: 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.

Example Here

<input type="time" value="08:56">

See: http://www.w3.org/TR/html-markup/input.time.html

这篇关于HTML5输入类型的时间设置值不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆