Javascript Tutorial : Textarea Counting and Limiting




Lesson Code: http://www.developphp.com/video/JavaScript/textarea-Form-Field-Character-Counting-and-Limiting
Learn to use Javascript to limit and count a text field in your HTML based forms. Show the user how many characters are remaining that they can type into that field. It will visually limit the amount they can type in real time also.

Original source


24 responses to “Javascript Tutorial : Textarea Counting and Limiting”

  1. You replied to a year old comment, hehe. Now I'm certified in Dreamweaver… 😛 Haven't really made any actual webpage because one, you can't host it for free, and two, I don't know what to do it on! I have an idea now, though. Any recommendations on free hosting?

  2. @awesomelightning
    I have been testing quite a lot of them, and my favorite and daily use is notepad++.
    The only thing I miss with that is a snippet-container, the given solution for that is not the best…

  3. Adam?!
    I think 130592016 was asking what will happen to the max-length restriction if a user of this form toggles off javascript in his browser….
    If so, the correct answer should be:
    "If someone disables Javascript in his browser, the counter will not be changing from 250, AND the maximum value WILL be bypassed".

    Afaik there is no way to restrict a textarea with a simple html-property.
    But thanks Adam for showing this, I was wondering now for a long time how these thingies work…

Leave a Reply