HTML Basics - (Form)

Form (the form itself is not visible, pay special attention to the text field default width is 20 characters)

Communication between the front and rear includes two ways: 1, form submission. 2, Ajax submission.

Form core tags: Only commit function does not have any style.

form attributes:

1, action properties: submission address, usually the address of the server.

2, method: submission, get and post two common ways. The default mode is get.

input is the form the core of the label, by modifying the input tag type type of change to show the form.

<! DOCTYPE HTML>
<HTML>
<head>
<Meta charset = "UTF-. 8">
<title> </ title>
</ head>
<body>
<-!
Communication between the front and rear ends
1.form submission
2.ajax submission
->
<- core tags:! only functions submitted, without any style ->
<- form!
properties:
address action filed, typically the server's address, if you do not write the default page submission to the
method submitted by the way. get / post if you do not write, submit to get
the difference and get the post.
->
<form Action = "" Method = "">
<-!
Input, Button tag is a row within the block
input is the core of the label form to change the style of presentation by modifying the type attribute of the input tag ->
User name: <input type = "text" name = "username" /> <br />
password name: <input type = "

Gender: Male <input type = "radio" name = "sex" value = "1" checked /> F <the INPUT of the type = "Radio" name = "Sex" value = "0" />
<br />
<-! - a group must contain the same name attribute value ->
interests:
<- checkbox, of the type = "chechbox" ->!
<the INPUT of the type = "the checkBox" the checked = "the checked" name = "aihao" value = "0" /> soy sauce
<input type = "checkbox" checked name = "aihao" value = "1" /> fights
<input type = "checkbox" name = "aihao" value = "2" /> Paoniu
< input type = "checkbox" name = "aihao" value = "3" /> playing games
<input type = "checkbox" name = "aihao" value = "4" /> learning
<br />
come from:
- <drop-down box,!
"<SELECT name =">
<Option value = "> </ Option>"
</ SELECT> ->
<SELECT name = "hefang" ID = "">
<option value = "Wuhan"> Wuhan </ option>
<option value = "Jingzhou"> Jingzhou </ option>
<option value = "Yellowstone"> Yellowstone </ Option>
<option value = "Yangyang"> Xiangyang </ Option>
<option value = "Shiyan"> Shiyan </ Option>
</ SELECT>
<br />
Self Description:
<! - multi-line text boxes
<TextArea name = "" rows = "" cols = ""> </ TextArea> ->
<TextArea name = "miaoshu" rows = "" cols = ""> </ TextArea>
/> <br
<- submission:!
. 1, <Button> submitted </ Button>
2, <INPUT type = "Submit" value = "submit" />
->
<Button> submitted. 1 </ Button>
< input type = "submit" value = " submit" />
<-! <the INPUT of the type = "Image" src = "koala.jpg "/> Images presented in a way ->
<-!? behind the content parameters representing our ultimate goal is to make the necessary parameters to send to the backend.
want to send parameters, input must contain the name attribute

- ->
</ form>

</ body>
</ HTML>

Guess you like

Origin www.cnblogs.com/ddrr123/p/10937461.html