Datalist arrow not coming in ie and firefox

后端 未结 4 579
醉话见心
醉话见心 2020-12-17 16:40

Hi I am using a datalist tag for a dropdown as in the fiddle. I am getting the arrow for dropdown in chrome only. and the arrow is not coming in ie and firefox. In firefox t

4条回答
  •  佛祖请我去吃肉
    2020-12-17 16:42

    Well I did some searching and i immediately found this on w3schools. http://www.w3schools.com/tags/tag_datalist.asp This page clearly states that it is meant to implement auto completion. Auto completion is a feature often found in IDE's with the purpose of providing possible values while you type. In other words Firefox and IE implement it the right way. As soon as you decide to type something in the textbox, it provides you with possible options and while you type, it filters the possible options. In this case Chrome implements it rather strange by making it a dropdown box. Auto completion is not supposed to work that way in the case where you would use a text input. You can use it for a dropdown box however when you use a select tag within your datalist as seen here https://www.w3.org/TR/html5/forms.html#the-datalist-element

提交回复
热议问题