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

前端 未结 10 1685
無奈伤痛
無奈伤痛 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:48

    Visually/functionally, 2 differences if the input type is 'search':-

    1. You get a 'X' symbol at the end of the input/search box to clear texts in the box
    2. Pressing 'Esc' key on keyboard also clears texts

提交回复
热议问题