文本区域最大长度不起作用 [英] Text Area maxlength not working

查看:101
本文介绍了文本区域最大长度不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为textarea设置最大长度。

 < textarea name =txtDescriptioncols = 10我使用下面的代码来做同样的事情,但它不起作用。 rows = 3 maxlength = 50>< / textarea> 

但它不起作用,它需要超过50个字符。

解决方案

没有为 textarea 定义的 maxlength 属性。您需要 implements 使用JavaScript


I want to set maximum length to the textarea. I am using following code for the same,but it is not working,

<textarea name="txtDescription" cols=10 rows=3 maxlength=50></textarea>

But it is not working,it takes characters beyond 50.

解决方案

There's no maxlength attribute defined for textarea. You need to implement this using javascript.

这篇关于文本区域最大长度不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆