lundi 11 mai 2020

checkbox enable/disable from jquery

I have a question for onclick action. After clicking the "all" checkbox, <select> is blocked, but no "cl" is unchecked.

<form>
  <input type="checkbox" class="custom-control-input" id="all" name="all" onclick="this.form.elements['oh'].disabled = this.form.elements['cl'].removeAttr('checked') = this.checked">

  <select id="oh" name="oh">
    <option value="1">option 1</option>
    <option value="2">option 2</option>
    <option value="3">oprion 3</option>
  </select>

  <input type="checkbox" id="cl" name="cl">
</form>



Aucun commentaire:

Enregistrer un commentaire