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

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

    Right now, there isn't a huge deal between them - maybe there never will be. However, the point is to give the browser-makers the ability to do something special with it, if they want.

    Think about on cellphones, bringing up number pads, or type="email" bringing up a special version of the keyboard, with @ and .com and the rest available.

    On a cellphone, search could bring up an internal search applet, if they wanted.

    On the other side, it helps current devs with css.

    input[type=search]:after { content : url("magnifying-glass.gif"); }
    

提交回复
热议问题