you can disable/enable web element using attr and removeAttr functions respectively
// Disable #x
$(“#x”).attr(“disabled”,”disabled”);
// Enable #x
$(“#x”).removeAttr(“disabled”);
Example:
type=”button” value=”Disable” onclick=”$(‘#x’).attr(‘disabled’,'disabled’)”/>
Comments