How to have data list ?

<input list=”profession” id = “optedProfession” type=”search” placeholder=”Select the profession .” required=””>

<datalist id=”profession”>

<option value=”Player” />
<option value=”Techie” />
<option value=”Bussiness Man” />

</datalist>

How to read selected data list ?

alert ( “Selected profession from the option. : ” + $(“#optedProfession”).val() );

 

 

Advertisements