Bladephp: Now with 7+ codeigniter, php, and laravel project 7+ php project From $18/Year From Rs. 1000/Year

How to count total character in textbox using Jquery

by
Category:javascript
javascript jquery html
How to count total character in textbox using Jquery

In this tutorial you are going to see how to write a jQuery script which should display the number of characters entered in a textbox realtime. This script could be very much useful if you want show the user how many characters the user has entered into a text box or textarea. You may also like How to limit character input in the textarea including count using Jquery and How to count same value comma separated string in php.

HTML Code

<textarea class="countCharacter"></textarea>
<div id="getcount"></div>

Jquery Code

<script type="text/javascript">
    $('.countCharacter').keyup(function(){
        var value  = $(this).val();
        var countvalue  = value.length;
        $('#getcount').html(countvalue);
    });
</script>

0 Comments


Html code work in comment box


Related Post