HTML form and the use of form internal tags

HTML form and the use of form internal tags

Copy code
The code is as follows:

<html>
<head>
<title>Use of form</title>
<!--
Tag name: form Form tag attributes: action: submission destination, target address URL
method: Set the method of submitting the request, get and post; the default is get
What is the difference between get and post submission? ------------------------
Get transmission: The content information is placed in the address bar for transmission, and the length is limited to 1k, and the security is not good.
Post transmission: transmit the content in the body information. There is no length limit.
Sub-tags:
Input tag: The value needs to be submitted and must have a name attribute.
Attributes: type: password, etc.
//------------
Through the demonstration of the following example, it is found that in some cases, form can be used to make a link, and at the same time as making the link, data can be submitted to the address file of the target.
fieldset tag: define domain
Legend tag: define the title of the domain
-->
</head>
<body>
<fieldset>
<legend>form form tag, subtag example:</legend>
<form action="01 List.html" method="get">
<table border="1px" width="800px">
<tr>
List Tags:

<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat" selected="selected">Fiat</option>
<option value="audi">Audi</option>
</select>

</tr>
<tr>
Checkbox example:

I like bicycles:
<input type="checkbox" name="Bike">

I like cars:
<input type="checkbox" name="Car">

</tr>
<tr>
Radio Buttons:

male:
<input type="radio" checked="checked" name="Sex" value="male">

female:
<input type="radio" name="Sex" value="female">
</form>
<p>When the user clicks a radio button, that button becomes selected and all other buttons become unselected. </p>
</tr>
<tr>
Text field:

<textarea rows="10" cols="30">Use of text area tags</textarea>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td>Account:</td>
<td>
<input name="userid">
</td>
</tr>
<tr>
<td>Password:</td>
<td>
<input name="pwd">
</td>
</tr>
<tr>
<td>
<input type="submit" value="Confirm submission"/>
</td>
<td>
<input type="reset" value="Reset"/>
</td>
</tr>
</table>
</form>
</fieldset>
</body>
</html>

Any tag with name and value attributes can be placed inside the form, and the data of these tags can also be submitted to another URL.

<<:  vue dynamic component

>>:  Mobile Internet Era: Responsive Web Design Has Become a General Trend

Recommend

How to connect to virtual machine MySQL using VScode in window environment

1. Virtual Machine Side 1. Find the mysql configu...

How to modify the default encoding of mysql in Linux

During the development process, if garbled charac...

VMware Workstation installation Linux system

From getting started to becoming a novice, the Li...

Detailed explanation of Vue's list rendering

Table of contents 1. v-for: traverse array conten...

MySQL Optimization: InnoDB Optimization

Study plans are easily interrupted and difficult ...

Detailed explanation of how to configure openGauss database in docker

For Windows User Using openGauss in Docker Pull t...

MySQL data type selection principles

Table of contents Small but beautiful Keep it sim...

Detailed explanation of mkdir command in Linux learning

Table of contents Preface 1. Basic knowledge of f...

CSS3 creates web animation to achieve bouncing ball effect

Basic preparation For this implementation, we nee...

The concrete implementation of JavaScript exclusive thinking

In the previous blog, Xiao Xiong updated the meth...

How to uninstall MySQL 5.7.19 under Linux

1. Find out whether MySQL was installed before Co...

Implementation of Webpack3+React16 code splitting

Project Background Recently, there is a project w...

Navicat imports csv data into mysql

This article shares with you how to use Navicat t...