form form definition and usage
<Form> tag is used to create HTML form to a user input.
Form can comprise input elements , such as text fields, check boxes, radio buttons, and so on submit button.
Forms may also contain Menus , the TextArea , fieldset , Legend and label elements .
Form for transmitting data to the server.
form element is a block element which produces longitudinal fold line.
form and format elements using the form introduced
<form name="" action="" method="">
Method Submit action accepted transmission path get fost
Input types can be divided into the following categories:
Form element type:
Text type:
Input box: text
Password box: password
Date: date
Data: data
File: file
Hide Box: hidden
Submit button:
Push button: button
Form button: submit
Clear button: reset
Select button default value (checked)
Radio buttons: radio
Checkboxes: checkbox
Universal Type Format:
Input type=“” name=“”
Not a common type format:
Multiple: multiple choice select properties and size is used in conjunction with size shows the number of drop-down value
Select Default dropdown box (selected)
< Select name=“” id=“”
<Option selected ></ Option >
Textarea multi-line text input box
Example:
1 <!doctype html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>无标题文档</title> 6 </head> 7 <body> 8 <form action="" method="post"> 9 10 账号:<input type="text" name="user"><br> 11 密码:<input type="password" name="pawe"><br> 12 生日:<input type="date" name="bir"><br> 13 性别:<input type="radio" checked>男 <input type="radio">女<br> 14 兴趣:<input type="checkbox"> Basketball & nbsp; < the INPUT of the type = "the CheckBox" > Football & nbsp; < the INPUT of the type = "the CheckBox" > volleyball < br > 15 Hobbies: < the INPUT of the type = "the CheckBox" > Tennis & nbsp; < the INPUT of the type = "the CheckBox" > climbing nbsp &; < the INPUT of the type = "the CheckBox" > running < br > 16 ethnic: <select name=""ID = "" > . 17 < Option > Han </ Option > 18 is < Option > Hui </ Option > . 19 < Option > Tibetan </ Option > 20 is < Option > Dai </ Option > 21 is < Option > Zhuang </ Option > 22 is 23 is </ SELECT > < br > 24 introduction: <br> 25 <textarea name="" id="" cols="30" rows="10"></textarea><br> 26 27 上传文件:<input type="file"><br> 28 <button>提交</button> 29 <input type="submit" name="" value="sub提交"> 30 <input type="reset" id="" name="" value="清空" > 31 </form> 32 </body> 33 </html>
FIG real code runs: