This commit is contained in:
parent
398e35cf19
commit
ed55fe0175
|
@ -23,10 +23,13 @@ function setMaxLength() {
|
|||
function checkMaxLength() {
|
||||
var maxLength = this.getAttribute('maxlength');
|
||||
var currentLength = this.value.length;
|
||||
if (currentLength > maxLength)
|
||||
alert(currentLength);
|
||||
if (currentLength >= maxLength) {
|
||||
this.relatedElement.className = 'toomuch';
|
||||
else
|
||||
}
|
||||
else {
|
||||
this.relatedElement.className = '';
|
||||
}
|
||||
this.relatedElement.firstChild.nodeValue = currentLength;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue