如何采取步骤和限制在html5中输入时间? [英] how to take steps and limits to input time in html5?

查看:48
本文介绍了如何采取步骤和限制在html5中输入时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要自7到23个小时自定义数据输入,并在输入时间中采取 10分钟的步骤,如以下示例所示:

I need to customize the data entry from 7 to 23 hours and take 10 minute steps in the input time like the following example:

input time >>>
07:10
07:20
07:30
...
...
22:40
22:50
23:00

请帮我...

推荐答案

您需要使用以下属性:

  • 步骤步骤
  • min (下限)
  • max 用于上限
  • step for the steps
  • min for the lower limits
  • max for upper limits

检查以下代码:

<input type="time" step="600" min="07:00" max="23:00" />

参考文献: https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/input/time

这篇关于如何采取步骤和限制在html5中输入时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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