Answer the question
In order to leave comments, you need to log in
How to disable select?
How to disable the other when changing the value in one select?
For example, so that when the third item is selected in the first select, the neighboring select is not available at all, and if you change it to two or one, everything turns back on.
https://codepen.io/oldschool1705/pen/pojKMBg
Answer the question
In order to leave comments, you need to log in
<select onchange="checkValue(this.value)">
<option> Один</option>
<option> два</option>
<option> три</option>
</select>
<select id="abc">
<option> выкл</option>
<option> выкл</option>
<option> выкл</option>
</select>
const checkValue = val => {
document.getElementById('abc').disabled = val === 'три';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question