开发者

TextArea MaxLength - Supported or Not Supported?

开发者 https://www.devze.com 2023-01-29 18:24 出处:网络
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.

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 thi开发者_运维知识库s thanks to HTML5 or ? Does that means having a maxlength on textareas no longer requires a jQuery type plugin?

Thanks


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消