ข้อมูลอ้างอิง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> HTML

ตัวอย่าง

<output> องค์ประกอบที่อยู่นอกแบบฟอร์ม (แต่ยังคงเป็นส่วนหนึ่งของแบบฟอร์ม):

<form action="/action_page.php" id="numform"
oninput="x.value=parseInt(a.value)+parseInt(b.value)">
<input type="range" id="a" name="a" value="50">
+ <input type="number" id="b" name="b" value="25">
<input type="submit">
</form>

<output form="numform" id="x" name="x" for="a+b"></output>

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

แอตทริบิวต์formระบุรูปแบบที่ <output>แท็กเป็นของ

ค่าของformแอตทริบิวต์จะต้องเท่ากับ idแอตทริบิวต์ของ<form> องค์ประกอบในเอกสารเดียวกัน


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

Attribute
form Not supported Not supported Not supported Not supported Not supported

ไวยากรณ์

<output form="form_id">

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

Value Description
form_id Specifies the form element the <output> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document.

❮ แท็ก <output> HTML