Baseline Widely available
HTMLSelectElement.disabled
ããããã£ã¯è«çå¤ã§ãHTML ã® disabled
屿§ãåæ ãããã®ã³ã³ããã¼ã«ãç¡å¹ã§ãããã©ããã示ãã¾ããç¡å¹ã§ãã£ãå ´åãã¯ãªãã¯ãåãä»ãã¾ãããç¡å¹ãªè¦ç´ ã¯ä½¿ç¨ã§ãããã¯ãªãã¯ã§ãã¾ããã
è«çå¤ã§ãã
ä¾ HTML<label>
飲ã¿ç©ã¯ãããï¼
<input id="allow-drinks" type="checkbox" />
</label>
<label for="drink-select">飲ã¿ç©ã®é¸æ:</label>
<select id="drink-select" disabled>
<option value="1">æ°´</option>
<option value="2">ãã¼ã«</option>
<option value="3">ããã·</option>
<option value="4">ã¦ã£ã¹ãã¼</option>
</select>
JavaScript
const allowDrinksCheckbox = document.getElementById("allow-drinks");
const drinkSelect = document.getElementById("drink-select");
allowDrinksCheckbox.addEventListener(
"change",
(event) => {
drinkSelect.disabled = !event.target.checked;
},
false,
);
çµæ 仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4