0

What the different about <input> + <datalist> and <select> tag? Sorry for bad English..

4th Apr 2017, 4:06 PM
Muhammad Bintang Firdaus
Muhammad Bintang Firdaus - avatar
3 Respuestas
+ 3
datalist are suggestions that would appear when you'd fill the input that is attached to while select contains specific, pre-set values. In the former, the user can fill the input with whatever he wants whereas in the latter, he/she can only chose one among the options that youve proposed to him/her. This way, the select permits you to limit and control the received values.The interface differs between the two as well. (bear in mind that although it's not appearent​, any sneaky user can change the select option values easily, therefore, concider do some checkings in the server side)
4th Apr 2017, 4:31 PM
CHMD
CHMD - avatar
+ 1
With <datalist>, you can type inside the input field, and the values in the dropdown are restricted as you type more characters. With <select>, you only have the dropdown.
4th Apr 2017, 4:29 PM
Álvaro
+ 1
OK, I got it. I can write other option with <input> + <datalist>. Thank's a lot for all.
4th Apr 2017, 4:37 PM
Muhammad Bintang Firdaus
Muhammad Bintang Firdaus - avatar