Is there a float input type in HTML5?

前端 未结 9 1923
失恋的感觉
失恋的感觉 2020-11-22 11:32

According to html5.org, the \"number\" input type\'s \"value attribute, if specified and not empty, must have a value that is a valid floating point number.\"

Yet it

9条回答
  •  旧时难觅i
    2020-11-22 12:32

    Based on this answer

    
    

    Meaning :

    Char code :

    • 48-57 equal to 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
    • 0 is Backspace(otherwise need refresh page on Firefox)
    • 46 is dot

    && is AND , || is OR operator.

    if you try float with comma :

    
    

    Supported Chromium and Firefox (Linux X64)(other browsers I does not exist.)

提交回复
热议问题