There are two ways to disable/enable form elements.Set the 'disabled' attribute to true or false:// Disable #x$('#x').attr('disabled', true);// Enable #x$('#x').attr('disabled',…