6. Form
6.1 Create a table:
The table <table></table>
is defined by a line for each tag <tr></tr>
definition, each row is divided into a plurality of cells, the <td></td>
defined
data cells can contain text, images, lists, paragraphs, forms, horizontal
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>建立表格</title>
</head>
<body>
<table border="1">
一列
<tr>
<td>100</td>
</tr>
</table>
<table border="1">
一行三列
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
</table>
<table border="1">
三行三列
<tr>![d0def294ed096a8940d8d4e67e557edf.png](en-resource://database/2581:1)
<td>周一</td>
<td>周二</td>
<td>周三</td>
</tr>
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
</table>
</body>
</html>
6.2 Form of the border
In the example above border = "1"
is used to set the table border, which forms the border of a predetermined pixel, border
only control the thickness of the outer border
so we used cellspacing
the thickness, i.e., the property to control the border between the cells and the cell distance
in accordance with the Example: table border = "1" cellspace = "8"
table
the cellpadding
attribute is used to control the contents of the cell of the distance between the inner boundary to
connect Example:table border = "1" cellspace = "8" cellpadding = "8"
6.3 setting table or cell width and height
width
And height
attribute values may be a pixel or as a percentage, if it is not set to default width and height of the content of
connected cases: table border = "1" cellspace = "8" cellpadding = "8" width = "300" height = "300"
<tr></tr>
there are height
properties indicating the height of the line, if the percentage value, it indicates that the table row the total the percentage height
<td></td>
also width
attribute indicating a cell where the width of the column, when the percentage is, the percentage of the total row width, said table
6.4 Background to set the table
Table bgcolor
attribute table can be used to set the background color
background
attribute is used to set the background image setting tables
may be provided in a background of a cell line or separately
6.5 Table border color settings
bordercolor
Property can be set outside the border color of the table
6.6 Location table
6.6.1 horizontal position
align
Property can be set in a horizontal position form the parent vessel, which is left
or center
or right
, i.e., in a horizontal vessel rich home left, center, right of abode
6.6.2 vertical position
valign
Attribute is used to control the vertical position of the content in the cell, its value top
, middle
and bottom
, i.e., the content of the cell in the cell vertically home, and the home center, we can control the entire line, a control unit may be grid
6.7 Adding header and title for the table
By <caption></caption>
adding labeled form of the title, the title is centered with respect to the table
<th></th>
numbers are used to form the header is added, it will replace the corresponding positions of <td></td>
marker in the tagged text is displayed in bold and centered within the cell
The combined 6.8 cells
6.8.1 interbank
Interbank i.e. longitudinal merged cell, as long as the provided <td></td>
tag rowspan
properties can be achieved, rowspan
in a number ranging from
6.8.2 Across Columns
I.e. across the cell columns consolidated laterally disposed only <td></td>
tag colspan
properties can be achieved, colspan
in a number ranging from
Form 7
Form using the form tag <form name = "" method = "" action = ""></form>
attribute "name" for form a name; "method" attribute is used to set the transmission data. There are two values, "post" and "get", "action" attribute specifies the name of the server-side processing program, that is, when clicking the "Submit" button submitted address.
Interview:
POST: the data submitted to the address bar is not displayed, relatively safe; data length is no limit on the address bar
get: defaults to get submitted, the data will be displayed on the address bar, insecurity; on the address bar length limited data
used form element
7.1 input element input
7.1.1 text field
<input type="text" name="" value="" size="" maxlength="" readonly="readonly(只读)">
type="text"
Claim Form line text box element is
name
a text box named
value
set the initial contents of the text box, the text does not fill the space
size
of the text box display the length of
maxlength
the maximum number of characters of the input text box
7.1.2 password input box
The type
value of the property goes password
to
<input type="password" name="pss"/ maxlength="10">
7.1.3 checkbox
The type
value becomes the property radio
to achieve
<input type="radio" name="" checked value="女"/>女
value
data submitted along with the
checked
default selected item
7.1.4 check box
<input type="checkbox" name="" value=""/>
value
Followed by the data submitted
7.1.5 submit button
<input type="submit name="" value=""
value
Name displayed on the display button
7.1.6 Reset button
<input type="reset" value=""/>
7.1.7 push button
<input type="button" value=""/>
7.1.8 Picture button
<input type="image" src="路径"/>
Function and submit the same button, the form can be submitted
7.1.9 Hidden Field
<input type="hidden" name="" value=""/>
Page can not see the field, but it will be submitted along with the form to be submitted
7.1.10 file field
<input type="file" name=""
7.2 drop-down box
<select name="">
<option selected="selected"></option>
</select>
More than 7.3-line text box
<textarea name="" row="行数" cols="列数"></textarea>
Do not mark the end of the line feed
8. framework
frameset (frameset, substituted body
) common attributes
rows=""
: Setting a frameset each frame occupies size
cols=""
: setting a frameset each frame occupies size
border=""
: setting frameset border thickness
bordercolor=""
: setting a frame border color set
frameborder=""
: Set if there is no border, 1 0
frame common attributes
noresize="
noresize ": Set the frame can not be any drag
src=""
: The framework introducing path to the page
name=""
: framework named, target =" frame name "
scrolling="no|yes"
: The framework does not allow whether to allow scrolling on behalf of no scrolling, yes representatives allowed to roll
8.5 floating frame
<iframe></iframe>
: It can be used as a label in html
8.5.1 floating frame common attributes
src=""
: The introduction path floating frame page
width=""
: Width of the floating frame is provided
height=""
: setting the height of the floating frame
scrolling=""
: the frame is allowed to scroll the representative scroll allowed no, yes allowed to roll on behalf of
frameborder=""
: is provided if there is no border, 1 0
name=""
: to take a frame name
align=""
: horizontal alignment set frame