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
1. Virtual Machine Side 1. Find the mysql configu...
During the development process, if garbled charac...
From getting started to becoming a novice, the Li...
Table of contents 1. v-for: traverse array conten...
Study plans are easily interrupted and difficult ...
For Windows User Using openGauss in Docker Pull t...
Table of contents Small but beautiful Keep it sim...
Table of contents Preface 1. Basic knowledge of f...
Basic preparation For this implementation, we nee...
In the previous blog, Xiao Xiong updated the meth...
In a page, there are many controls (elements or ta...
1. Find out whether MySQL was installed before Co...
Project Background Recently, there is a project w...
This article shares with you how to use Navicat t...
1. Radio grouping As long as the name is the same,...