Multiple selection of Drop down listbox onChangeWe have how to read selected item of a drop down listbox. Now we will learn how to read date when we use multiple selection in a dropdown list box. Here is the code to read the data. We will get all the options of the list box in an array. So total number of elements of an array can be found out by using length property.
To display the element we will use for loop.
Note that inside the for loop we are using one if condition to found out which are the elements selected. To do this we have used s1[i].selected. This will return true if the options is selected. Then we will add to our string by using s1.value property.
ListBox Validation : Checking if option is selected before submitting a form
ListBox Disable: using disabled property we can disable a listbox by radio button
Adding option: Adding options to a listbox dynamically
Moving Options Moving Options from a listbox to other
Removing Options: Removing options from a listbox
Copying List data : Copying user entered data from one to other form
Dependant list box : Linking two dropdown listboxes
list box with Data : Populating Listbox by taking data from MySQL table
Listbox Menu: Redirecting page based on selection of listbox