What the different about <input> + <datalist> and <select> tag? Sorry for bad English.. | SoloLearn: Learn to code for FREE!

0

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

4/4/2017 4:06:43 PM

Muhammad Bintang Firdaus

3 Answers

New Answer

+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)

+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.

+1

OK, I got it. I can write other option with <input> + <datalist>. Thank's a lot for all.