Thuộc tính biểu mẫu HTML <meter>
Ví dụ
Phần tử <meter> 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" method="get" id="form1">
First name: <input type="text" name="fname"><br>
<input type="submit" value="Submit">
</form>
<p><label for="anna">Anna's score:</label>
<meter id="anna"
form="form1" name="anna" min="0" low="40" high="90" max="100"
value="95"></meter></p>
Hãy tự mình thử »Định nghĩa và cách sử dụng
Thuộc tính form
chỉ định dạng mà thẻ <meter>
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ử <meter>
trong cùng một tài liệu.
Hỗ trợ trình duyệt
Attribute | |||||
---|---|---|---|---|---|
form | Not supported | Not supported | Not supported | Not supported | Not supported |
Cú pháp
<meter form=" form_id ">
Giá trị thuộc tính
Value | Description |
---|---|
form_id | Specifies the form element the <meter> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document. |
❮ Thẻ <mét> HTML