Thuộc tính biểu mẫu HTML <textarea>
Ví dụ
Vùng văn bản nằm bên ngoài biểu mẫu (nhưng vẫn là một phần của biểu mẫu):
<form action="/action_page.php" id="usrform">
Name: <input type="text" name="usrname">
<input type="submit">
</form>
<textarea name="comment" form="usrform">Enter text here...</textarea>
Hãy tự mình thử »Định nghĩa và cách sử dụng
Thuộc tính form
chỉ định hình thức mà vùng văn bản thuộc về.
Giá trị của thuộc tính này phải bằng thuộc tính id
của phần tử <form>
trong cùng một tài liệu.
Hỗ trợ trình duyệt
Attribute | |||||
---|---|---|---|---|---|
form | Yes | 11.0 | Yes | Yes | Yes |
Cú pháp
<textarea form=" form_id ">
Giá trị thuộc tính
Value | Description |
---|---|
form_id | Specifies the form element the <textarea> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document. |
❮ Thẻ HTML <textarea>