HTMLTextAreaElement: disabled property
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Thuộc tính disabled của giao diện HTMLTextAreaElement cho biết điều khiển văn bản nhiều dòng này có bị vô hiệu hóa và không thể tương tác hay không. Nó phản ánh thuộc tính disabled của phần tử <textarea>. Khi false, textarea này vẫn có thể bị vô hiệu hóa nếu phần tử chứa nó, chẳng hạn như <fieldset>, bị vô hiệu hóa.
Giá trị
Một giá trị logic.
Ví dụ
js
const textareaElement = document.getElementById("comment");
if (commentsDisabled) {
textareaElement.disabled = true;
}
Đặc tả kỹ thuật
| Specification |
|---|
| HTML> # dom-fe-disabled> |