Textarea tag in HTML

Textarea tag in HTML

<textarea></textarea> is used to create a text box that can input multiple lines. This tag pair is used between the <form></form> tag pair. <textarea> has the following attributes:

(1) onchange specifies the function to be called when the control changes
(2) onfocus is the function to be executed when the control receives the focus
(3) onblur is the function to be executed when the control loses focus
(4) onselect is the function to be executed when the control content is selected
(5)name This text block is used for identification and will be passed to CGI.
(6)cols is the width of the text block.
(7)rows is the number of columns in this text block, that is, its height.
(8) The wrap attribute defines how the input content is displayed when it is larger than the text area. The possible values ​​are as follows:

*The default value is automatic text wrap; when the input exceeds the right edge of the text field, it will automatically go to the next line, and there will be no line break at the place where the data is automatically wrapped when it is submitted for processing;
*Off, used to avoid text wrapping. When the input content exceeds the right boundary of the text field, the text will scroll to the left;
*Virtual, allows text to wrap automatically. When the input exceeds the right edge of the text field, it will automatically go to the next line, and there will be no line break where the data is automatically wrapped when it is submitted for processing;
*Physical, wrap the text, and when the data is submitted for processing, the line breaks will also be submitted for processing.

Here the columns and rows are in units of characters.


Copy code
The code is as follows:

<html>
<head>
<title>Multi-line text box</title>
</head>
<body>
<form action="" method="post">
<p>Your opinion is important to me:
<textarea name="yj" clos="20" rows="5">
Please enter your comments in this area
</textarea>
</form>
</body>
</html>

<<:  Introduction to local components in Vue

>>:  The three new indexes added in MySQL 8 are hidden, descending, and functions

Recommend

Analysis of the Principles of MySQL Slow Query Related Parameters

MySQL slow query, whose full name is slow query l...

How to implement real-time polygon refraction with threejs

Table of contents Preface Step 1: Setup and front...

Two solutions for automatically adding 0 to js regular format date and time

Table of contents background Solution 1 Ideas: Co...

General Guide to Linux/CentOS Server Security Configuration

Linux is an open system. Many ready-made programs...

Page Speed ​​Optimization at a Glance

I believe that the Internet has become an increas...

Detailed explanation of :key in VUE v-for

When key is not added to the v-for tag. <!DOCT...

Detailed steps to start the Django project with nginx+uwsgi

When we develop a web project with Django, the te...

Issues and precautions about setting maxPostSize for Tomcat

1. Why set maxPostSize? The tomcat container has ...

Detailed explanation of webpage screenshot function in Vue

Recently, there is a requirement for uploading pi...

HTML implements read-only text box and cannot modify the content

Without further ado, I will post the code for you...

MySQL 8.0.21.0 Community Edition Installation Tutorial (Detailed Illustrations)

1. Download MySQL Log in to the MySQL official we...

JavaScript implements product details of e-commerce platform

This article shares a common example of viewing p...

15 Linux Command Aliases That Will Save You Time

Preface In the process of managing and maintainin...

Detailed explanation of MySQL InnoDB index extension

Index extension: InnoDB automatically extends eac...