ข้อมูลอ้างอิงHTML

HTML โดยตัวอักษร HTML ตามหมวดหมู่ รองรับ HTML Browser แอตทริบิวต์ HTML HTML Global Attributes เหตุการณ์ HTML HTML สี HTML Canvas HTML เสียง/วิดีโอ ชุดอักขระ HTML HTML Doctypes การเข้ารหัส URL HTML รหัสภาษา HTML รหัสประเทศ HTML ข้อความ HTTP วิธี HTTP ตัวแปลง PX เป็น EM แป้นพิมพ์ลัด


HTML <output> สำหรับแอตทริบิวต์

❮ แท็ก <output> HTML

ตัวอย่าง

ทำการคำนวณและแสดงผลใน <output> องค์ประกอบ:

<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">
  <input type="range" id="a" value="50">
  +<input type="number" id="b" value="25">
  =<output name="x" for="a b"></output>
</form>

ความหมายและการใช้งาน

แอตทริบิวต์forระบุความสัมพันธ์ระหว่างผลลัพธ์ของการคำนวณและองค์ประกอบที่ใช้ในการคำนวณ


รองรับเบราว์เซอร์

ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนแอตทริบิวต์อย่างเต็มที่

Attribute
for 10.0 13.0 4.0 7.0  11.5

ไวยากรณ์

<output for="element_id">

ค่าแอตทริบิวต์

Value Description
element_id Specifies a space separated list of ids of one or more elements that specifies the relationship between the result of the calculation, and the elements used in the calculation

❮ แท็ก <output> HTML