HTML form drop down list box to give single or multiple options to user with attributes and examples

preview_player
Показать описание
SELECT element can show various option to user for selection of choice and the same can be carried as part of the form data to action page.

Select element must have name or id to handle the selections.
By adding selected attribute to option we can keep the option default selected.

We can use autofocus attributes to keep the select box in focus when the page loads
We can add disabled attribute to disable the selection box
User can select multiple options by holding the ctrl key, for this we have to add multiple option to the select element.
While displaying all the elements we can restrict the number of display options by specifying size attributes.
User selection we can carry to submit page and receive the user selected option.

#selectbox #dropdownlistbox #selectoption #attributesofselectbox #formelements #htmlform #htmlformdropdownlistbox #plus2net
Рекомендации по теме