- <html>
- <head>
- <script src='jquery-1.3.2.js'></script>
- <script>
- $(function(){
- $('textarea').keypress(function(e){
- if(this.value.length >= 5)
- e.preventDefault();
- });
- })
- </script>
- </head>
- <body>
- <textarea></textarea>
- </body>
- </html>
限制textarea字符
最新推荐文章于 2021-06-03 04:46:36 发布