disable and enable button css code example
Example 1: javascript how to disable a 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');
Example 2: css disable button click
button.disabled{
pointer-events: none;
}
Example 3: css for disabled button
/* CSS Selectors for CSS2 and CSS3 both */
button:disabled,
button[disabled]{
border: 1px solid #999999;
background-color: #cccccc;
color: #666666;
}