|
|
@ -23,10 +23,13 @@ function setMaxLength() {
|
|
|
|
function checkMaxLength() {
|
|
|
|
function checkMaxLength() {
|
|
|
|
var maxLength = this.getAttribute('maxlength');
|
|
|
|
var maxLength = this.getAttribute('maxlength');
|
|
|
|
var currentLength = this.value.length;
|
|
|
|
var currentLength = this.value.length;
|
|
|
|
if (currentLength > maxLength)
|
|
|
|
alert(currentLength);
|
|
|
|
|
|
|
|
if (currentLength >= maxLength) {
|
|
|
|
this.relatedElement.className = 'toomuch';
|
|
|
|
this.relatedElement.className = 'toomuch';
|
|
|
|
else
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
this.relatedElement.className = '';
|
|
|
|
this.relatedElement.className = '';
|
|
|
|
|
|
|
|
}
|
|
|
|
this.relatedElement.firstChild.nodeValue = currentLength;
|
|
|
|
this.relatedElement.firstChild.nodeValue = currentLength;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|