TextArea MaxLength - Supported or Not Supported?

我怕爱的太早我们不能终老 提交于 2019-12-31 01:47:08

问题


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.

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

Thanks


回答1:


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.



来源:https://stackoverflow.com/questions/4372413/textarea-maxlength-supported-or-not-supported

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!