可通过增加size特性的值来将一个下拉列表框变成一个能显示多个选项的列表框。size特性的值应该是你希望一次显示的选项数量。
<!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div>TODO write content</div> <form action="http://www.example.com/profile.php"> <p>通过增加size特性的值来将一个下拉列表框变成一个能显示多个选项的列表框。</p> <select name="instruments" size="3" multiple="multiple"> <option value="guitar"selected="selected">第一个</option> <option value="drlue">第二个</option> <option value="keyboard" selected="selected">第三个</option> <option value="bass">第四个</option> </select> </form> </body> </html>