Built From Developers For Developers
» Kuikie.com » Snippets » JavaScript » Strings » Limit Amount of Entered Text into TextArea
  Categories
  JavaScript
    Ajax
    IFrame
    Integers
    Other
    Strings
 

Limit Amount of Entered Text into TextArea

This script shows how to limit the amount of text that a user is allowed to enter into a textarea using JQuery.

    <textarea maxlength="150" onkeyup="var val = $(this).val(); if(val.length>150){$(this).val(val.substr(0,150));}"></textarea>
 
©2012 Sinevia Ltd Terms of Use         Privacy Policy Valid XHTML 1.0 Transitional