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

Vue ElementUI implements asynchronous loading tree

This article example shares the specific code of ...

Do you know all 24 methods of JavaScript loop traversal?

Table of contents Preface 1. Array traversal meth...

When should a website place ads?

I recently discussed "advertising" with...

The difference between ID and Name attributes of HTML elements

Today I am a little confused about <a href=&quo...

Solution to SNMP4J server connection timeout problem

Our network management center serves as the manag...

How to deploy hbase using docker

Standalone hbase, let’s talk about it first. Inst...

CSS 3.0 text hover jump special effects code

Here is a text hovering and jumping effect implem...

Introduction to basic concepts and technologies used in Web development

Today, this article introduces some basic concept...

MySQL Order By Multi-Field Sorting Rules Code Example

Say it in advance On a whim, I want to know what ...

A brief analysis of MySQL explicit type conversion

CAST function In the previous article, we mention...

MySQL Server IO 100% Analysis and Optimization Solution

Preface During the stress test, if the most direc...

Detailed installation tutorial of zabbix 4.04 (based on CentOS 7.6)

1. Preparation before installation: 1.1 Install J...

Add and delete table information using javascript

Getting Started with JavaScript JavaScript is a l...

Detailed analysis of several situations in which MySQL indexes fail

1. Leading fuzzy query cannot use index (like ...