I am able to get the character count by[html]function maxlength(x){var x=document.getElementById('txtarea').value;alert(x.length)<br><br>[/html]<br><br>but wonder how to get the line count</TD></TR></TABLE></BLOCKQUOTE>alert(x.split(/\n/).length);</BLOCKQUOTE>alert(x.split(/\n/).length);