HTML option value property
Examples
HTML form drop-down list:
<form action="demo_form.html">
<select name="cars">
<option value="volvo">Volvo XC90</option>
<option value="saab">Saab 95</option>
<option value="mercedes">Mercedes SLK</option>
<option value="audi">Audi TT</option>
</select>
<input type="submit" value="提交">
</form>
<select name="cars">
<option value="volvo">Volvo XC90</option>
<option value="saab">Saab 95</option>
<option value="mercedes">Mercedes SLK</option>
<option value="audi">Audi TT</option>
</select>
<input type="submit" value="提交">
</form>
try it"
Browser Support
All major browsers support attribute value.
Definition and Usage
value attribute specifies the form is submitted to be sent to the server value.
Start label <option> and end tag </ option> is between the browser displays the contents of the drop-down list, and the value attribute value is the value of form submission is sent to the server.
Note: If no value attribute value of the option will be set to <option> tag content.
Differences between HTML 4.01 and HTML5
no.
grammar
<option value="value">
Property Value
值 | 描述 |
---|---|
value | 发送到服务器的值。 |
HTML <option> tag