HTML5 - input=number and incompatible browsers

后端 未结 3 2012
耶瑟儿~
耶瑟儿~ 2020-12-30 01:04

I want to use the html5 element on my website, but i want to know what happens to this field in browsers that do not support this

3条回答
  •  别那么骄傲
    2020-12-30 01:31

    When a browser does not recognize a particular type value for an , it reverts to it's default value, which is text. So, all of the following are equivalent on browsers that do not support type="number":

    
    
    
    
    

    For browsers that do support type="number", the number will be displayed instead of the text .

    Read more about the type attribute in the HTML Specification.

提交回复
热议问题