We know that only the values of input, textarea, and select three types of tags in web development will be submitted to the server. For example, the input tag has attributes such as title, type, disabled, but these properties are for display purposes and cannot be modified by the user.
For input, the textarea tag is very obvious in its value, input is written dead when defined, and the value of the TEXTAREA tag is well defined (the user writes its value). However, the value of the SELECT tag has some differences when it is used: You can set the Value property in <option>, and then commit the set value directly to the server.
<select name= "area" >
<option value= "BJ" > Beijing </option>
<option value= "sh" > Shanghai </ option>
<option value= "JZ" > Jiaozuo </option>
</select>
At the time of submission, if "Beijing" is selected, the "AREA=BJ" is submitted to the server. In the <option> default Value property, the selected text is submitted when the data is submitted.
1 <select name= "area" >
2 <option > Beijing </option>
3 <option > Shanghai </option>
4 < Option > Jiaozuo </option>
5 </select>
At the time of submission, if "Beijing" is selected, it is "area= Beijing" submitted to the server.
A further bold speculation follows this: the so-called Select tag is actually a text element that can be selected (restricted selection), which is equivalent to filling the text with this option when an option is selected. So the submitted data is naturally the "value" that is filled in the "text".