TextArea MaxLength - 支持还是不支持? [英] TextArea MaxLength - Supported or Not Supported?

查看:117
本文介绍了TextArea MaxLength - 支持还是不支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我准备添加一个jQuery插件来支持textarea上的maxlength,并注意到MaxLength属性在Safari,Chrome和Firefox上本地工作。

I was getting ready to add a jQuery plugin to support maxlength on textarea's and noticed that the MaxLength attribute is working natively on Safari, Chrome, and Firefox.

是这要归功于HTML5还是?这是否意味着textareas上的maxlength不再需要jQuery类型的插件?

Is this thanks to HTML5 or ? Does that means having a maxlength on textareas no longer requires a jQuery type plugin?

谢谢

推荐答案

是的, maxlength 已添加到< textarea> in HTML5 ,这就是为什么你会在新浏览器中看到这种行为的原因。

Yes, maxlength was added to <textarea> in HTML5, so that's why you're seeing the behavior in newer browsers.

你需要一个插件吗?这取决于...如果您需要支持旧浏览器,那么是。

Do you need a plugin? that depends...if you need to support older browsers, then yes.

这篇关于TextArea MaxLength - 支持还是不支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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