mardi 10 mars 2020

Disable select if checkbox checked jquery

I have a html script where there is a multiple select I want to be "disabled" when I check a checkbox field.

Example:

<p><input type="checkbox" id="chk_select" name="check" value="ok" "/> deselect</p>

<p>
<select multiple="multiple" name="candidato[]" id="soci" required>
<option value="">-</option>
<option value="Name 1">Name 1</option>
<option value="Name 2">Name 2</option>
</select>
</p>


Is it possible to disable the multiple select with jquery?

Thank You! Giuseppe




Aucun commentaire:

Enregistrer un commentaire