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

❮ แท็ก HTML <textarea>

ตัวอย่าง

พื้นที่ข้อความที่อยู่นอกแบบฟอร์ม (แต่ยังคงเป็นส่วนหนึ่งของแบบฟอร์ม):

<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>

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

แอตทริบิวต์formระบุรูปแบบพื้นที่ข้อความที่เป็นของ

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


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

Attribute
form Yes 11.0 Yes Yes Yes

ไวยากรณ์

<textarea form="form_id">

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

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.

❮ แท็ก HTML <textarea>