📜  HTML select标签

📅  最后修改于: 2020-11-04 00:47:45             🧑  作者: Mango

HTML标签用于创建具有多个选项的下拉列表。的

输出:

属性:

特定于标签的属性:

Attribute Value Description
autofocus autofocus This attribute let automatically focused the drop-down list on page load.
disabled disabled It is used to disable the control and user cannot interact with the drop-down list.
form form-id It specifies one or more forms, to which select belong to.
multiple multiple If it sets then a user can select multiple options from the list.
name name It determines the name for the drop-down list.
required required If it specified, user must select that field before submitting the form.
size number It specifies the visible number of options in the list.

全局属性:

标签支持HTML中的事件属性。

支持的浏览器

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
Yes Yes Yes Yes Yes