Limit number of characters in input field

前端 未结 9 876
Happy的楠姐
Happy的楠姐 2020-11-30 12:28

I want to use jquery to limit the number of characters in an editable div (or form input).

9条回答
  •  被撕碎了的回忆
    2020-11-30 12:58

    Maxlength attribute- for browser, that support this feature.
    Javascript - for others.

    
    
    

    http://jsfiddle.net/tvpRT/

提交回复
热议问题