0
Q:

css disable button

//Using Javascript
//Disabling a html button

document.getElementById("Button").disabled = true;
//Enabling a html button

document.getElementById("Button").disabled = false;


//Using jQuery
//Disabling a html button

$('#Button').attr('disabled','disabled');
//Enabling a html button

$('#Button').removeAttr('disabled');
5
<button id="btnSubmit" class="btn-disable">Click</button>

<style type="text/css">
    .btn-disable
        {
        cursor: not-allowed;
        pointer-events: none;

        /*Button disabled - CSS color class*/
        color: #c0c0c0;
        background-color: #ffffff;

        }
</style>
1
<button type="button" disabled>This button is disabled</button>
5
button:disabled,
button[disabled]{
  border: 1px solid #999999;
  background-color: #cccccc;
  color: #666666;
}
1

New to Communities?

Join the community