i have a textarea in my form
<textarea id="word_count"></textarea>
Cost <input type="text" value=""/>
I used to find the cost based on number of characters the user enters in the textbox. $50 for each 200 characters. result would be like this
cost = $50 for 200 character
$100 for 400 character
$150 for 600 character
I found the number of characters entering in the textbox.
<script>
$("#word_count").on('keyup', function() {
var word_count =$("#word_count").val().replace(/\s/g, "").length;
});
</script>