Max characters in textarea with jquery

前端 未结 16 1799
逝去的感伤
逝去的感伤 2020-12-03 04:53

I have the following code, and I\'m kind of stuck on what to do next. The idea is when you enter text into a text area a counter tells you how many characters you have left.

16条回答
  •  一向
    一向 (楼主)
    2020-12-03 05:12

    A simple way to do this is to set the text in the textarea to a substring of the full amount. You can find an example here:

    http://www.mediacollege.com/internet/javascript/form/limit-characters.html

提交回复
热议问题