In my previous article I have explained aboutConvert string to lowercase-uppercase in xslt. In this article I am going to explain about how to add,remove,check and set the items in select using jQuery
For example in my form I have a select option with id “seloption”. To add a item with value “option1” and with text “Option-1” below code is used.
Now to remove the option with value “option1” below code is used.
To check whether the option with value “option1” is present in the select below code is used
If the option is present then it will return the index value of the option. Otherwise it will return -1. To make the option “option1” as a selected option below code is used.
To get the selected value of the select below code is used.
Do you like this article? Help us to improve. Please post your comments below.