Da quello che ho capito dovrebbe essere il numero massimo di caratteri che accetta, ma ho provato a impostarlo a es. 20, ma il textarea continua ad accettare caratteri, e poi anche charCount non ho capito bene a cosa serva

Codice PHP:
charCount 1;
maxCharCount 2000
function 
displayRemLength(fieldName) {
remField document.getElementById(fieldName);
remField.innerHTML = (maxCharCount charCount 0) ?  // Quando il contatore arriva a 0, a video mostra 0 continuo (quello impostato a "maxCharCount - charCount : 0")
maxCharCount charCount 0;  // Quando il contatore arriva a 0, a video mostra 0
}
function 
evalEntryLength(curFieldmaxLimitdiscardXtraerrClassnormalClass) { 
maxCharCount maxLimit;  
var 
fieldLength getCharCount(curField); 
if (
fieldLength maxLimit 20) { if (errClass != "") {    // A 20 caratteri rimanenti il contatore diventa rosso
document.getElementById('contSX').className errClass
document.getElementById('charCountParole').className errClass;  
document.getElementById('charCount').className errClass;             
}
if (
discardXtra) {
showAllowedLength(curFieldmaxLimit);
}

else if (
normalClass != "") {
curField.className normalClass;
}
}
function 
getCharCount(curField) {
charCount curField.value.length;
return 
charCount;
}
function 
showAllowedLength(curFieldmaxLimit) {
curField.value curField.value.substr(0maxLimit);
window.status curField.value;