The difference between readOnly and disabled in the form:
Readonly is only valid for input (text/password) and textarea, while disabled is valid for all form elements, including select, radio, checkbox, button, etc.
But after the form element is disabled, when we submit the form by POST or GET, the value of this element will not be passed out, and readonly will pass the value out (this situation occurs when we Set the textarea element in a form to disabled or readonly, but the submit button can be used).
js operation:
document.getElementById(element).disabled=val;
}
//Three methods to remove the disabled attribute
$('#areaSelect').attr("disabled",false);
$('#areaSelect').removeAttr("disabled");
$('#areaSelect').attr("disabled","");
$(element).find(":textfield").attr('disabled',val);
}