English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
multiple 属性是布尔属性,multiple 属性指定可以一次选择多个选项。
允许多个选择的下拉列表:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <select> multiple 属性使用-基础教程(oldtoolbag.com)</title> </head> <body> <form action="action_page.php"> <select multiple> <option value="PHP">PHP</option> <option value="Python">Python</option> <option value="C#">C#</option> <option value="Golang">Golang</option> </select> </form> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the multiple attribute.
The multiple attribute is a boolean attribute.
The multiple attribute specifies that multiple options can be selected at once.
Selecting multiple options varies between different operating systems and browsers:
For Windows: Hold down the Control (ctrl) button to select multiple options
For Mac: Hold down the command button to select multiple options
The use of checkboxes is more user-friendly because the way this operation is performed is different, and because it is necessary to inform the user that multiple selections can be made.
None.
In XHTML, attribute abbreviation is prohibited, the multiple attribute must be defined as <select multiple="multiple">.
<select multiple>HTML <select> Tag