The main content of today's study is the knowledge of the forms in the Web page.
1. Properties of the form (the start end tag of the form is <form></form>)
• Attribute action (action pointing) such as <form action= "xxx.php" > indicates that the form is submitted to xxx.php for processing.
• Attribute method (form submission method), there are two kinds of get and post. Where the Get method displays the contents of the form submission directly in the address bar and has a content size limit; The Post method does not display the contents of the form in the Address bar, the user does not see the delivery of the form data, and the content size is unlimited.
• Attribute target (target jumps to), with _self (open on this page), _blank (opens on new page) and always new page open, _new (opens only in a new page).
2. Text of the form
• Defined by the type genus in the <input type= "" > Input tag, with text (text field), password (password input text, which hides the input as a small dot), hidden (hidden) hides the contents of this tag. Size to control the display length of the text field,
<textarea></textarea> the Label text box to enter text content, you can limit the size of the text box with width (width), cols (number of rows), rows (number of columns).
The Datastore property defines the name of the label (which can be used for the identification of the same selection in a radio box) and can have the same name as other labels
value (value) property to define the value of the label (or the default display value)
The ID attribute defines the identity of the label that is identified and referenced, and the ID of each tag is unique and cannot be duplicate.
The MaxLength property is used to limit the input character length of a text field.
3. Buttons for forms
• Defined by <input type= "" > Input tag type attribute, with
button (normal button, no actual effect)
The submit (submit button) submits the corresponding content in the form to the action
Reset (reset button) clears the contents of the form
Image (Picture button) is usually inserted into the picture, click on the picture with the same effect as the Submit button, submit the expression content.
4. Selection button for the form
• The Radio box (multiple selection) is defined by the <input type= "Radio" >, where the Name property represents a selection with other labels of the same name, and the Value property represents what is displayed
• check box (can be multiple) defined by <input type= "checkbox" >, the Value property represents the selected content displayed
<laber for= "id" > tag means fuzzy Click, that is, click the corresponding display content is also equivalent to click the corresponding selection button
5. Drop-down menu in the form
• Start End tab of drop-down menu <select></select>
• The contents of the drop-down menu are defined with <option></option>
6. Other properties
The ReadOnly property indicates that the label is read-only and cannot be modified by editing
disable attribute, equivalent to ReadOnly, label cannot be edited and modified
hidden property, which indicates that the label is hidden and cannot be displayed on the front page
The checked property indicates that the default check
The Select property that represents the default display value for the drop-down menu
PHP Learning day03