input type=“text” vs input type=“search” in HTML5

前端 未结 10 1666
無奈伤痛
無奈伤痛 2021-01-30 12:05

I\'m new to HTML5 as begun to work with HTML5\'s new form input fields. When I\'m working with form input fields, especially and

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 12:40

    Bonus point: input type="search" has the ability to use the onsearch attribute (although I have noticed this does NOT work in Microsofts new Edge Browser), which eliminates the need to write a custom onkeypress=if(key=13) { function() } thing.

提交回复
热议问题