HTML5:输入类型持续时间 [英] HTML5: input type duration
本文介绍了HTML5:输入类型持续时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用输入类型持续时间.我正在尝试以某种方式进行输入,用户要添加这样的持续时间,例如 06:30:27:15(hh:mm:ss:ms)
,并且应该只允许(0-23:0-59:0-59:0-59)
.
Is there a way to use input type duration. I am trying to make a input in a way, a user to add time duration something like this 06:30:27:15 ( hh:mm:ss:ms )
and should allow only (0-23:0-59:0-59:0-59)
.
任何帮助表示赞赏!
注意!:我想在Angular2 +中实现.
NOTE!: I want to implement this in Angular2+.
推荐答案
<label for="appt">Choose a time for your meeting:</label>
<input type="time" id="appt" name="appt"
min="09:00" max="18:00" required>
<small>Office hours are 9am to 6pm</small>
尝试一下...希望对您有所帮助!这是我为我的一个项目所做的……
Try this... I hope this helps ! This is something I did for one of my projets...
这篇关于HTML5:输入类型持续时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文