為 Bootstrap 按鈕設定停用狀態


要設定停用狀態,請使用 disabled 類。

你可以嘗試執行以下程式碼以獲取按鈕的停用狀態 −

示例

即時演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
   </head>
   <body>
      <p>The following are some buttons:</p>
      <button type = "button" class = "btn btn-default btn-lg ">
         Default Button
      </button>
      <button type = "button" class = "btn btn-default btn-lg" disabled = "disabled">
         Disabled Button
      </button>
   </body>
</html>

更新日期: 12-6-2020

184 個瀏覽量

啟動您的 職業生涯

完成課程並獲得認證

開始
廣告
© . All rights reserved.