Home > Article > Web Front-end > TextArea sets the maximum input value of the MaxLength attribute js code_javascript skills
The MAXLENGTH attribute of TEXTAREA in standard DHTML documents does not work by default and only works when an event occurs
As follows: http://spiderscript.net/site/spiderscript/examples/ex_textarea_maxlength.asp
But there is and works in TEXT ,
So how to realize that the input content cannot exceed how many characters in TEXTAREA?
Method 1, if you only need to intercept the content of a few characters, you can: