На главную   Содержание   Следующая
 
 
<html><body>
<p align=center>
<form name=myform action="YOUR-SCRIPT.CGI">
<font size="1" face="arial, sans-serif"> Ввод до 25 символов. )<br>
<textarea name=message wrap=physical cols=28 rows=4 onKeyDown="checkMaxInput(this.form)" onKeyUp="checkMaxInput(this.form)"></textarea>
<br>
<input readonly type=text name=remLen size=3 maxlength=3 value="25"> characters</font>
</form>
</p>
</body>//osw
</html>
<SCRIPT LANGUAGE="JavaScript">
maxLen = 25;
function checkMaxInput(form) {
if (form.message.value.length > maxLen)
form.message.value = form.message.value.substring(0, maxLen);
else form.remLen.value = maxLen - form.message.value.length;
}
</script>