In this article, we will change the selected option of the radio button using jQuery. To select the value of the radio button we can set the “checked” to set to the desired option. For setting the property, we can use the prop()method in jQuery.
Note: Selector, is the desired radio option element to be selected.
Example: Let us create a radio button group to select a favorite cricket player. We have created a radio option. By default, “Sachin” will be selected. When we click thebutton, the “Dhoni” option will be selected as given in the program.
Please Login to comment...