English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die select size-Eigenschaft legt die Anzahl der sichtbaren Optionen in der Dropdown-Liste fest, wenn der Wert der size-Eigenschaft größer ist als1but less than the total number of options in the list, the browser will add a scrollbar to indicate that there are more options available to view.
mit4eine Liste der sichtbaren Optionen
<form action="action_page.php"> <select name="lan" size="2"> <option value="PHP">PHP</option> <option value="Python">Python</option> <option value="C#">C#</option> <option value="Golang">Golang</option> </select> <input type="submit"> </form>Test and see ‹/›
IEFirefoxOperaChromeSafari
In Chrome and Safari, for size = “ 2“and size =” 3“”
The size attribute specifies the number of visible options in the drop-down list.
If the value of the size attribute is greater than1but less than the total number of options in the list, the browser will add a scrollbar to indicate that there are more options available to view.
None.
<select size="number">
Value | Description |
---|---|
number | The number of visible options in the drop-down list. The default value is1. |