Here Mudassar Ahmed Khan has explained with an example, how to get multiple selected (checked) CheckBox values as Comma Separated String using JavaScript.
When the Get Button is clicked, the CheckBoxes will be referenced using a loop. Inside the loop if the CheckBox is selected (checked) then its value will be inserted into an Array.
Finally, the values of the selected (checked) CheckBoxes inside the Array will be displayed as Comma Separated String using JavaScript Alert Message Box.
↧