Before learning HTML form, think of text boxes, password boxes, hidden fields, radio buttons, check boxes, and so on the ordinary page often see the form is not very small, very simple, to their own code area implementation of the flexible series to use it, only to find a bit is not simple. Look easy, their own operation or there are a lot of problems. The original "name | class" Between the "|" I do not know how to display the code, ask the teacher to know <td>Home |</td>, learn lable, its label is the role of the input or option and its label text, but what is the value of the construction site? Standing in the user's perspective, can be more convenient for users to fill in information or information, to give users a better experience. <input type= "Radio" name= "Gender" value= "1" checked= "checked"/> Male, "checked" is the default selection, while select (Form element: drop-down box) The default selected option in is "selected",
double Complex drop-down box syntax <label for ="province"> Provinces </label>
<select id="province"> <option> Please select </option> <option selected="selected"> guangdong </option> <option> shanghai </option> </Select> <label for ="Cities"> City </label> <select id="City" multiple="multiple" size="4" Disabled="Disabled"> <option> Please select </option> <option selected="selected"> guangzhou </option > <option> shenzhen </option> <option> Huizhou </option> <option> qingyuan </option> </select>
The use of HTML forms