Form & lt; form & gt; consists of form elements. Common form elements include the following tags: input field tag & lt; input & gt;, selection field tag & lt; select & gt; and & lt; option & gt;, text field Mark & lt; textarea & gt;, etc. Form
Parameter name refers to the name of the input field, and parameter type refers to the type of the input field. In The following types of input fields are provided in the tag. you can use the type attribute to select a type based on your needs.
Type attribute values and examples:
1. text
Instance:
Note: name indicates the name of the text box. value indicates the default value of the text box. size indicates the width (in characters) of the text box. maxlength indicates the maximum number of input characters in the text box.
4. radio
Instance:
MaleFemale
Note: The single-choice button is used to set a set of selection items. you can select only one item. the checked attribute is used to set this single-choice button to be selected by default.
5. checkbox
Instance:
BooksFruitFood
Note: the check box allows you to select multiple options. The checked attribute is used to set the check box to be selected by default. For example, when collecting personal information, you need to make multiple choices in the options of personal interests.
9. hidden
The instance is as follows:
Description: hidden fields are used to implicitly submit variable values in the form. Hidden domains are invisible to users on the page. the purpose of adding hidden domains is to collect or send information in a hidden manner. When a viewer clicks the send button to send a form, information about hidden fields is also sent to the processing page specified by action.
The above is the input domain markAndExamples of the type attribute show that friends need to remember this and perform more operations, because forms will be very useful in future development.
The above is the input field mark of PHP form element introduction.For more information, see other related articles in the first PHP community!