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. |
>>: Mobile Internet Era: Responsive Web Design Has Become a General Trend
Recently, there is a particularly abnormal busine...
1. Introduction to Macvlan Before the emergence o...
Nginx hides version number In a production enviro...
Table of contents Problem Description Rendering T...
Netease Kanyouxi official website (http://kanyoux...
Table of contents CSS3 Box Model a. CSS3 filter b...
This article shares the specific code of JavaScri...
1. Grammar location [=|~|~*|^~|@] /uri/ { ... } 2...
1. What is Parallax scrolling refers to the movem...
Table of contents 1. Decoupled assignment of arra...
Today I made a Spring Festival gold coin red enve...
The EXPLAIN statement provides information about ...
/****************** * Kernel debugging technology...
Today, because I wanted to install MySQL, I went ...
In web front-end development, it is inevitable to ...