check this out
Please conside about this see my code bellow which is maxlength is prevent users type more than 150 character, so i choose this to make it simple
<textarea class="form-control" maxlength="150" name="product_keterangan" required=""></textarea>
Then i use this js just for count charachter
var maxLength = 150;
$('textarea').keyup(function() {
var length = $(this).val().length;
var length = maxLength-length;
$('#chars').text(length);
});
No comments:
Post a Comment