mercredi 24 juin 2015

JavaScript unchek checkbox with dynamic id [duplicate]

This question already has an answer here:

I have a problem with unchecking checkbox with dynamic id.

Both of them are checked but I need to set if one is clicked that other one is disabled then this is example:

<input id="value_Ture_do_30_15_0" class="rnr-checkbox" name="value_Ture_do_30_15[]" value="1" checked="checked" type="checkbox">

<input id="value_Ture_preko_30_15_0" class="rnr-checkbox" name="value_Ture_preko_30_15[]" value="1" checked="checked" type="checkbox">

I have tried this like:

$("[id^='value_Ture_do_30']").checked = false

But it does not work. If you can help me Thanks




Aucun commentaire:

Enregistrer un commentaire