Bootstrap Tutorial - Bootstrap Disabled state








Disable a button

The following code adds the disabled attribute to <button> buttons.

<!DOCTYPE HTML>
<html> 
<head> 
<link href="http://java2s.com/style/bootstrap.min.css" rel="stylesheet">
</head><!--  ww  w.  ja  v  a 2s  .  com-->
<body style='margin:20px;'>

<button type="button" class="btn btn-lg btn-primary" disabled="disabled">Primary button</button>
<button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
        
</body>
</html>

Click to view the demo