首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

用JS限制表单textarea的文字输入量

整理日期:2007年08月22日 【字体:


伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-08/1187748347.html
countfield.value = maxlimit - field.value.length;
}
//-->
</SCRIPT>

如下是表单:
以下是引用片段:

<form name=myform action="">
<textarea name=message wrap=physical cols=28 rows=4 onKeyDown="textCounter(this.form.message,this.form.remLen,125);" onKeyUp="textCounter(this.form.message,this.form.remLen,125);">
</textarea>
<br>
尚能输入
<input readonly type=text name=remLen size=4 maxlength=3 value="125">
个字符</div>
</form> 
Tags:
用JS限制表单textarea的文字输入量
'http://www.etoow.com/html/2007-08/1187748347.html
1
 
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved