Can any guru show me how to get values from HTML Form element – RADIO BUTTON and CHECK BOX?
For example in case of text box we can get the value directly by getElementById(id).value;
But how to get the value for a combo box (drop down menu), radio button and checkbox ?
Thanks.
Drop down (
<select>):If you’re treating your select list as a multi-select (combobox) list, you have to loop through the options and check if they are selected:
Radio buttons and checkboxes should also have
valueproperties, but more appropriately I think I would only test whether they are checked: