ในการสร้างการป้อนข้อความแบบหลายบรรทัด ให้ใช้แท็ก HTML คุณสามารถกำหนดขนาดของพื้นที่ข้อความโดยใช้แอตทริบิวต์ cols และ rows ใช้ภายในแบบฟอร์ม เพื่อให้ผู้ใช้สามารถป้อนข้อความได้หลายแถว</P> <p style="">นี่คือแอตทริบิวต์ของแท็ก <textarea> -</P> <table><thead><tr><th style="width:20.354%; text-align:center;">แอตทริบิวต์ <br> </th> <th style="width:16.4602%; text-align:center;">ค่า <br> </th> <th style="width:62.97%; text-align:center;">คำอธิบาย <br> </th> </tr> </thead> <tbody><tr><td style="width:20.354%; text-align:center;">ออโต้โฟกัส <br> </td> <td style="width:16.4602%; text-align:center;">ออโต้โฟกัส <br> </td> <td style="width:62.97%;">ระบุว่าในการโหลดหน้า พื้นที่ข้อความควรได้รับการโฟกัสโดยอัตโนมัติ <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">Cols <br> </td> <td style="width:16.4602%; text-align:center;">number <br> </td> <td style="width:62.97%;">ระบุความกว้างของพื้นที่ข้อความตามจำนวนความกว้างของอักขระที่มองเห็นได้ <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">ปิดการใช้งาน <br> </td> <td style="width:16.4602%; text-align:center;">ปิดการใช้งาน <br> </td> <td style="width:62.97%;">ระบุความกว้างของพื้นที่ข้อความตามจำนวนความกว้างของอักขระที่มองเห็นได้ <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">form <br> </td> <td style="width:16.4602%; text-align:center;">form_id <br> </td> <td style="width:62.97%;">ระบุอย่างน้อยหนึ่งรูปแบบ <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">ความยาวสูงสุด <br> </td> <td style="width:16.4602%; text-align:center;">number <br> </td> <td style="width:62.97%;">ระบุจำนวนอักขระสูงสุดในพื้นที่ข้อความ <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">ชื่อ <br> </td> <td style="width:16.4602%; text-align:center;">text <br> </td> <td style="width:62.97%;">กำหนดชื่อให้กับตัวควบคุมอินพุต <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">ตัวยึดตำแหน่ง <br> </td> <td style="width:16.4602%; text-align:center;">text <br> </td> <td style="width:62.97%;">ระบุคำใบ้สั้นๆ ของค่าในพื้นที่ข้อความ <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">อ่านอย่างเดียว <br> </td> <td style="width:16.4602%; text-align:center;">อ่านอย่างเดียว <br> </td> <td style="width:62.97%;">ตั้งค่าการควบคุมอินพุตเป็นแบบอ่านอย่างเดียว จะไม่อนุญาตให้ผู้ใช้เปลี่ยนค่า อย่างไรก็ตาม ตัวควบคุมสามารถรับโฟกัสและรวมอยู่ด้วยเมื่อทำการแท็บผ่านตัวควบคุมฟอร์ม <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">required <br> </td> <td style="width:16.4602%; text-align:center;">required <br> </td> <td style="width:62.97%;">ระบุว่าต้องมี textarea <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">แถว <br> </td> <td style="width:16.4602%; text-align:center;">number <br> </td> <td style="width:62.97%;">ระบุความสูงของพื้นที่ข้อความตามจำนวนบรรทัดข้อความที่มองเห็นได้ หากมีข้อความมากกว่านี้ ผู้ใช้สามารถเลื่อนโดยใช้แถบเลื่อนของพื้นที่ข้อความ <br> </td> </tr> <tr><td style="width:20.354%; text-align:center;">wrap <br> </td> <td style="width:16.4602%; text-align:center;">hard <br> อ่อน <br> </td> <td style="width:62.97%;">ระบุข้อความที่จะห่อในพื้นที่ข้อความ <br> </td> </tr> </tbody> </table> <p> <br> </P> <p> <img loading='lazy' alt='วิธีสร้างการป้อนข้อความหลายบรรทัด (พื้นที่ข้อความ) ใน HTML ' src="/article/uploadfiles/202203/2022033115575381.jpg" /></P> <h2>ตัวอย่าง</h2> <p style="">คุณสามารถลองเรียกใช้โค้ดต่อไปนี้เพื่อสร้างการป้อนข้อความแบบหลายบรรทัดใน HTML -</P> <pre><!DOCTYPE html> <html> <head> <title>HTML textarea Tag</title> </head> <body> <form action = "/cgi-bin/hello_get.cgi" method = "get"> What improvements you want in College? <br> <textarea rows = "5" cols = "60" name = "description"> Enter details here... </textarea><br> <input type = "submit" value = "submit" /> </form> </body> </html></pre> <br> </article> <div class="ad ad5"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4480737146802772" crossorigin="anonymous"></script><!-- computer.wsxdn --><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4480737146802772" data-ad-slot="4467655591" data-ad-format="auto" data-full-width-responsive="true"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <section id="turn-page" class="t-over"> <div class="f-start f-align"> <i><img loading='lazy' src="https://th.wsxdn.com/css/img/sanjiao.svg" alt=""></i> <a class='LinkPrevArticle' href='https://th.wsxdn.com/db044w/zx451s/1004063838.html' ><button> กับ <input type=button /> แตกต่างกันอย่างไร? </a> </div> <div class="f-start f-align"> <i><img loading='lazy' src="https://th.wsxdn.com/css/img/sanjiao.svg" alt=""></i> <a class='LinkNextArticle' href='https://th.wsxdn.com/db044w/zx451s/1004063840.html' >วิธีการใช้ textarea (ช่องป้อนข้อความหลายบรรทัด) ใน HTML? </a> </div> </section> <section class="box1-3"> <ol class="f-between"> <li class="aList-2 aList f-between f-align"> <div> <a href="https://th.wsxdn.com/db044w/zx451s/1004063748.html" class="title"> <p class="r-over r-over-2" title="จะสร้างเส้นขอบตารางใน HTML ได้อย่างไร? "> จะสร้างเส้นขอบตารางใน HTML ได้อย่างไร? </p> </a> </div> </li><li class="aList-2 aList f-between f-align"> <div> <a href="https://th.wsxdn.com/db044w/zx451s/1004063756.html" class="title"> <p class="r-over r-over-2" title="จะสร้างช่องว่างระหว่างรายการสัญลักษณ์แสดงหัวข้อย่อยและข้อความใน HTML ได้อย่างไร? "> จะสร้างช่องว่างระหว่างรายการสัญลักษณ์แสดงหัวข้อย่อยและข้อความใน HTML ได้อย่างไร? </p> </a> </div> </li><li class="aList-2 aList f-between f-align"> <div> <a href="https://th.wsxdn.com/db044w/zx451s/1004063762.html" class="title"> <p class="r-over r-over-2" title="จะสร้างรายการสั่งซื้อใน HTML ได้อย่างไร? "> จะสร้างรายการสั่งซื้อใน HTML ได้อย่างไร? </p> </a> </div> </li><li class="aList-2 aList f-between f-align"> <div> <a href="https://th.wsxdn.com/db044w/zx451s/1004063763.html" class="title"> <p class="r-over r-over-2" title="จะสร้างความคิดเห็นแบบมีเงื่อนไขใน HTML ได้อย่างไร? "> จะสร้างความคิดเห็นแบบมีเงื่อนไขใน HTML ได้อย่างไร? </p> </a> </div> </li> </ol> </section> </section> <aside class="box-r"> <section class="box4-1"> <strong> HTML </strong> <ol> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004063732.html" title="จะสร้างพื้นที่ที่คลิกได้ในภาพใน HTML ได้อย่างไร? "> <p class="r-over r-over-2">จะสร้างพื้นที่ที่คลิกได้ในภาพใน HTML ได้อย่างไร? </p> </a> </li> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004063840.html" title="วิธีการใช้ textarea (ช่องป้อนข้อความหลายบรรทัด) ใน HTML? "> <p class="r-over r-over-2">วิธีการใช้ textarea (ช่องป้อนข้อความหลายบรรทัด) ใน HTML? </p> </a> </li> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004063950.html" title="สร้างข้อความที่แข็งแกร่งใน HTML "> <p class="r-over r-over-2">สร้างข้อความที่แข็งแกร่งใน HTML </p> </a> </li> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004063952.html" title="สร้างข้อความขนาดเล็กใน HTML "> <p class="r-over r-over-2">สร้างข้อความขนาดเล็กใน HTML </p> </a> </li> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004063960.html" title="เราจะแสดงพื้นที่ข้อความใน HTML ได้อย่างไร "> <p class="r-over r-over-2">เราจะแสดงพื้นที่ข้อความใน HTML ได้อย่างไร </p> </a> </li> </ol> </section> <ul> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004063723.html" class="i-text"><p class="r-over r-over-3">จะขีดเส้นใต้ข้อความใน HTML ได้อย่างไร? </p></a> </li> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004063728.html" class="i-text"><p class="r-over r-over-3">จะสร้างตารางใน HTML ได้อย่างไร? </p></a> </li> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004063738.html" class="i-text"><p class="r-over r-over-3">วิธีการทำเครื่องหมายตัวยกข้อความใน HTML? </p></a> </li> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004063739.html" class="i-text"><p class="r-over r-over-3">จะทำเครื่องหมายข้อความที่แทรกใน HTML ได้อย่างไร </p></a> </li> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004063741.html" class="i-text"><p class="r-over r-over-3">จะทำเครื่องหมายข้อความขีดทับใน HTML ได้อย่างไร? </p></a> </li> </ul> <ul class="types f-between"> <li><a class='childclass' href='https://th.wsxdn.com/db044w/hf444z/' target="_self">การเขียนโปรแกรม C</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/bz445u/' target="_self">C++</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/tr446l/' target="_self">Redis</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/rp447j/' target="_self">การเขียนโปรแกรม BASH</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/wu448o/' target="_self">Python</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/nl449f/' target="_self">Java</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/ig450a/' target="_self">ฐานข้อมูล</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/zx451s/' target="_self">HTML</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/ec452w/' target="_self">Javascript</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/db453v/' target="_self">การเขียนโปรแกรม</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/if454a/' target="_self">CSS</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/ge455y/' target="_self">Ruby</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/xv456p/' target="_self">SQL</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/jh457b/' target="_self">IOS</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/om458g/' target="_self">Android</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/mk459f/' target="_self">MongoDB</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/rp460j/' target="_self">MySQL</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/qn461i/' target="_self">C#</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/jh465b/' target="_self">PHP</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/kh471c/' target="_self">SQL Server</a></li> </ul> </aside> </section> <footer> <section class="msg f-center container"> <span class="f-start"> ลิขสิทธิ์ © <a href="https://th.wsxdn.com">https://th.wsxdn.com</a> สงวนลิขสิทธิ์ </span> </section> </footer> </body> </html>