Page 1 of 1

how to set and get checkbox value in Javascript

Posted: Sat Jun 06, 2015 6:58 am
by Dongzhi Yang7528784

Hi,

Could you let me know how to get checkbox value in javascript. If it's checked, should return true, otherwise returns false.

Also , how can i set the checkbox value in javascript. ?

Thanks

Dongzhi


how to set and get checkbox value in Javascript

Posted: Sat Jun 06, 2015 7:48 am
by Alena Prykhodko

how to set and get checkbox value in Javascript

Posted: Sun Jun 07, 2015 3:57 am
by Dongzhi Yang7528784

Hi Alena,

The following code works from the first link under the Radio section:
$('input[name="radio_group"][value="1"]').attr('checked', true);
$('input[name="radio_group"]').checkboxradio("refresh")

Thanks

Dongzhi