简单教程
提交运行
代码编辑器:
<!DOCTYPE htm> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://cdn.bootcss.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet"> <style>body {margin:10px}</style> <div class="container"> <div class="row"> <div class="span5"> <h2>Bootstrap 按钮 JavaScript 插件</h2> <h3>控制状态</h3> <p><button id="fat-btn" data-loading-text="loading..." class="btn btn-primary">Loading State</button></p> <h3>单项切换</h3> <p><button class="btn btn-primary" data-toggle="button">Single Toggle</button></p> <h3>确认框</h3> <p><div class="btn-group" data-toggle="buttons-checkbox"> <button class="btn btn-primary">Left</button> <button class="btn btn-primary">Middle</button> <button class="btn btn-primary">Right</button> </div></p> <h3>单选框</h3> <p> <div class="btn-group" data-toggle="buttons-radio"> <button class="btn btn-primary">Left</button> <button class="btn btn-primary">Middle</button> <button class="btn btn-primary">Right</button> </div> </p> </div> </div> </div> <script src="/static/lib/bootstrap/2.3.2/docs/assets/js/jquery.js"></script> <script src="/static/lib/bootstrap/2.3.2/docs/assets/js/bootstrap.min.js"></script>
运行结果: