HTML <meter>แท็ก
ตัวอย่าง
ใช้องค์ประกอบมิเตอร์เพื่อวัดข้อมูลภายในช่วงที่กำหนด (มาตรวัด):
<label for="disk_c">Disk usage C:</label>
<meter id="disk_c" value="2"
min="0" max="10">2 out of 10</meter><br>
<label for="disk_d">Disk
usage D:</label>
<meter id="disk_d" value="0.6">60%</meter>
ความหมายและการใช้งาน
แท็ ก<meter>
กำหนดการวัดสเกลาร์ภายในช่วงที่รู้จักหรือค่าเศษส่วน นี้เรียกอีกอย่างว่าเกจ
ตัวอย่าง: การใช้ดิสก์ ความเกี่ยวข้องของผลลัพธ์การสืบค้น ฯลฯ
หมายเหตุ:<meter>
ไม่ควรใช้แท็กเพื่อระบุความคืบหน้า (เช่นเดียวกับในแถบความคืบหน้า) สำหรับแถบความคืบหน้า ให้ใช้แท็ก<progress>
เคล็ดลับ:เพิ่ม แท็ก <label> เสมอ เพื่อแนวทางปฏิบัติด้านการเข้าถึงที่ดีที่สุด!
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนองค์ประกอบอย่างสมบูรณ์
Element | |||||
---|---|---|---|---|---|
<meter> | 8.0 | 13.0 | 16.0 | 6.0 | 11.5 |
คุณลักษณะ
Attribute | Value | Description |
---|---|---|
form | form_id | Specifies which form the <meter> element belongs to |
high | number | Specifies the range that is considered to be a high value |
low | number | Specifies the range that is considered to be a low value |
max | number | Specifies the maximum value of the range |
min | number | Specifies the minimum value of the range. Default value is 0 |
optimum | number | Specifies what value is the optimal value for the gauge |
value | number | Required. Specifies the current value of the gauge |
คุณสมบัติสากล
แท็ ก<meter>
ยังสนับสนุน Global Attributes ในHTML
คุณสมบัติของเหตุการณ์
แท็ ก<meter>
ยังสนับสนุนแอตทริบิวต์เหตุการณ์ใน HTML
หน้าที่เกี่ยวข้อง
การอ้างอิง HTML DOM: Meter Object
การตั้งค่า CSS เริ่มต้น
ไม่มี.