简单教程
提交运行
代码编辑器:
<meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/static/lib/bootstrap/4.0.0/css/bootstrap.min.css"> <script src="/static/lib/jquery/3.3.1/jquery.min.js"></script> <script src="/static/lib/popper.js/1.12.9/umd/popper.min.js"></script> <script src="/static/lib/bootstrap/4.0.0/js/bootstrap.min.js"></script> <div class="container"> <h1>下拉菜单 <select></h1> <p>下拉菜单 <select> 可以让用户从多个选项中进行选择,但是默认情况下只能选择一个选项</p> <div class="form-group"> <label for="sel1">下拉菜单:</label> <select class="form-control" id="sel1"> <option>Python</option> <option>PHP</option> <option>Perl</option> <option>Java</option> </select> </div> </div>
运行结果: