如何防止秒数部分显示在HTML5时间输入元素上? [英] How can I prevent the seconds portion from displaying on the HTML5 time input element?

查看:80
本文介绍了如何防止秒数部分显示在HTML5时间输入元素上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我像这样添加HTML5时间输入元素时:

When I add the HTML5 time input element like so:

...它告诉我:

__:__:__

我不需要第三部分(秒),只需要小时和分钟.我该如何停止它并停止显示秒部分,所以像这样:

I don't want the third portion (seconds), just the hour and minutes. How can I get it to cease and desist from displaying the seconds portion, so that it's like this:

__:__

?我需要应用一些CSS或JavaScript/jQuery,还是... ???

? Do I need to apply some CSS, or JavaScript/jQuery, or...???

推荐答案

Chrome浏览器不显示秒,第三个输入是AM/PM. IE/Firefox不支持此功能

Chrome doesn't show seconds, the third input is AM/PM. IE/Firefox doesn't support this feature

<input type="time" name="yourtime"/>

这篇关于如何防止秒数部分显示在HTML5时间输入元素上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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