Home > Article > Backend Development > Introduction to PHP form elements: selection field tags and text field tags
Select field tags
A list can be created by selecting the field tags
The syntax format is as follows:
<select name="name" size="value" multiple> <option value="value" selected>选项1</option> <option value="value" >选项2</option> <option value="value" >选项3</option> ....... <select>
The parameter name represents the name of the selection field; the parameter size represents the number of rows in the list; the parameter value represents the menu option value; the parameter multiple represents the display of data in menu mode , the data is displayed in list mode by default.
The display methods and examples of the selection field tags
1. List mode
<select name=" lag " id=" lag "> <option value="0" selected>PHP</option> <option value="1" >JAVA</option> <option value="2" >HTML5</option> <select>
Running results As follows:
Description: Drop-down list box, create a list by selecting the field tags
Form
The above is the detailed content of Introduction to PHP form elements: selection field tags and text field tags. For more information, please follow other related articles on the PHP Chinese website!