0

我对 html5 输入编号有一些疑问,输入类型编号的最大限制是多少

例如。

如果单击微调器后最大值大于 15 或 17,则会显示(数字末尾的 +16)。

第二个查询是 ios5 的 html5 的 datepicker 的事件是什么。

谢谢

4

1 回答 1

0

我不知道您尝试了什么,但是没有为max属性指定限制,它可以是任何floating-point number

**Floating-point Number**
A floating-point number consists of the following parts, in exactly the following order:

    Optionally, the first character may be a "-" character.
    One or more characters in the range "0—9".
    Optionally, the following parts, in exactly the following order:
        a "." character
        one or more characters in the range "0—9"
    Optionally, the following parts, in exactly the following order:
        a "e" character or "E" character
        optionally, a "-" character or "+" character
        One or more characters in the range "0—9".

了解更多信息。http://www.w3.org/TR/html-markup/input.number.html

您可以从如何限制 HTML5“数字”元素中可能的输入中找到答案?

对于在线测试,请使用此站点http://www.w3schools.com/html/html5_form_input_types.asp

datetime可以参考http://tjvantoll.com/2012/06/30/creating-a-native-html5-datepicker-with-a-fallback-to-jquery-ui/

于 2013-02-06T07:38:22.830 回答