Learning Notes 1: form, learning notes 1 form
Knowledge point:
I. table tr td attributes
Ii. form elements
Certificate --------------------------------------------------------------------------------------------------------------------------------------------
I. table tr td attributes
Table attributes:
Border defaults to 0
Align horizontal position = "left (default) center right"
Width = 600 width
Height = "300" height
Cellpadding = "0" minimum distance from text to border
Cellspacing = "0" border Thickness
Bordercolor = "#0000000" border color
Bgcolor = "#000" background color
Background = "url" follows relative path rules. Note: If the width of the background image <the width of the table and the height of the background image <the height of the table, the background image is tiled horizontally and vertically.
**************************************** **************************************** **************
Tr controls a row
Height = the height of "40" rows
Align (horizontal position) = "left (default) center right"
Valign = "top-up middle-middle bottom"
Note: All elements have the id attribute and are unique. The identifier (alphanumeric _)/* the first character is composed of _ and letters */
**************************************** **************************************** **************
Td controls a cell
Align (horizontal position) = "left (default) center right"
Valign = "top-up middle-middle bottom"
Note: All elements follow the "proximity principle"
Merge cells:
-Colspan = "2" on the first row merges the cells of the row.
-Rowspan = "2" on two rows merge the column cells
Merge: first and second columns
Certificate --------------------------------------------------------------------------------------------------------------------------------------------
Ii. form elements
1. Form
Webpage request-> response work request-> response interaction is difficult and not timely
Form: used to solve the Interaction Problem between customer workers
2. form elements
Form: <form> </form>
Action jump = "path (following relative path rules )"
**************************************** **************************************** **************
Input element input
<Input type = ""/>
Type = "text" text box name = "u1" name value = "enter user name" Default value
Type = "password" password box name = "ui"
Type = "checkbox" check box name = "ck" checked = "checked" is selected by default
Type = "file" Upload Control name = "upi"
Type = "hidden" hidden domain name = "hd" Type = "radio" single parameter name = "us" <generally used for gender, must have the same value in the name attribute> checked = "checked" is selected by default
Button:
Type = "submit" submit button value = "register" button text
Type = "image" image submit button src = "path"
Type = "reset" reset button value = "reset" <restore other elements in the same form>
Type = "button" common button combined with js and jQuery code value = "normal"
**************************************** **************************************** **************
Non-input element
Drop-down list: <Select name = "sel"> select
<Option value = "1" selected = "selected"> Shanghai </option> selected = "selected" selected by default
<Option value = "2"> Beijing </option> option
<Option value = "3"> Guangxi </option>
<Option value = "4"> Guangdong </option>
<Option value = "5"> Shenzhen </option>
</Select>
Text Field: textarea
<Textarea rows = "6" cols = "40"> </textarea>
Rows = "number of rows" more than 6 rows with a scroll bar
Cols = "Number of columns". If the number of columns exceeds 40, a new line is generated.