disable input html code example
Example 1: javascript disable input
//javascript disable
document.getElementById("id").disabled = true;
//javascript enable
document.getElementById("id").disabled = false;
//jquery disable
$('#id').attr("disabled", true);
//enable
$('#id').attr("disabled", false);
Example 2: disable input type button in html
<input type="button" disabled value="Submit">
Example 3: css disabled
<input type="text" name="username" value="admin" >
<style type="text/css">
input[name=username] {
pointer-events: none;
}
</style>