In this section, you will learn how to create radio buttons in dojo. For creating radio button you need "dijit.form.CheckBox". The radio button do some action on press.
The RadioButton class is declared in the CheckBox.js file, hence you need dojo.require(dijit.form.CheckBox) for RadioButtons to work.
[Radio buttons are used when there is a list of two or more options that are mutually exclusive and the user must select exactly only one choice from a group of radio button. Click a non-selected radio button will deselect whatever other button was previously selected in the list.]
Radio Buttons are the same as html but dojo provides more controls and styling options than a conventional Radio button. The radio button also contains Boolean types value either 'true' or 'false'. The following example creates a Radio buttons:
Here is the code of Program:
Output of Program:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.