问题描述
你好朋友
我的视图中有一个textarea字段.
我需要设置每行72个字符的长度.
那是用户每行需要输入超过72个chracter,我需要转到下一行.
如何使用jquery或javascript设置这些限制?
谢谢
这不是标准方法,但是可以在许多浏览器中运行,请对其进行测试.
http://www.htmlcodetutorial.com/forms/_TEXTAREA_WRAP.html
<TEXTAREA NAME="HARD" COLS="72" ROWS="5" WRAP="HARD">
将wrap设置为hard会使它向服务器发送新行.将其设置为soft只会在视觉上破坏它.
hello Friends,
I have a textarea field in my view.
I need to set per line 72 characters length.
that is user is entering more than 72 chracter per line I need go to next line.
How to set these limits using jquery or javascript?
Thanks
This is not standard, but it works in many browsers, test it.
http://www.htmlcodetutorial.com/forms/_TEXTAREA_WRAP.html
<TEXTAREA NAME="HARD" COLS="72" ROWS="5" WRAP="HARD">
Setting wrap to hard makes it send new lines to the server. Setting it to soft only breaks it visually.
这篇关于每行Textarea限制字符Jquery或Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!