Get the character count of a textarea including newlines
I tested this code in Chrome and there seems to be a bug involving the newlines. I am reaching the maxlength before I actually use all the characters. var ta = document.getElementById('myText'); document.getElementById('max').innerHTML = ta.maxLength; setInterval(function() { document.getElementById('count').innerHTML = ta.value.length; }, 250); <textarea id="myText" maxlength="200" style="width:70%;height:130px"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s Type more words here... <