I am trying to display all options in my select tag when the user focus on the field or when my page is loaded:
here's my code
<select id='idSelect' autofocus>
<option value='val1'>1</option>
<option value='val2'>2</option>
<option value='val1'>3</option>
</select>
I used the "autofocus" attribute but it does not work and then i tried to do in my javascript code like this
document.getElementById('idSelect').autofocus = true;
any help would be appreciated.