<
SCRIPT LANGUAGE=
"JavaScript">
function CountLeft
(field, count, max
) {
if (field.value.length > max
) field.value = field.value.substring
(0, max
); else
count.value = max - field.value.length;
}
</
script>
<
form name=sample action=
"">
<
textarea rows=
"10" cols=
"40" name=
"text"
onKeyDown=
"CountLeft(this.form.text,this.form.left,50);"
onKeyUp=
"CountLeft(this.form.text,this.form.left,50);">
</
textarea>
<
br>
Počet zostávajúcich znakov:
<
input readonly type=
"text" name=
"left" size=3 maxlength=3 value=
"50">
</
form>