<input type=“search”> not working on iPhone Mobile Safari

后端 未结 2 1603
失恋的感觉
失恋的感觉 2021-01-12 10:14

Supposedly in HTML5 in Safari, you can define your input type as \"search\" and when the user starts typing, an X button will show up to allow them to clear, much like the G

2条回答
  •  终归单人心
    2021-01-12 11:16

    you need to make the type="search" attribute the first one in the tag - ie

    
    

    This bug has since been resolved for iphones but android browsers still need the search attribute first, otherwise it will be rendered as a standard input field.

提交回复
热议问题