jQuery count that includes all chars including ENTER, etc? -


i know want strip these out, need true char count , can't find out how it...

thanks help

use length property on string character count. e.g.

'this example string'.length // == 26 

or, jquery:

$('#my_textarea').html().length 

n.b. use html() not text() avoid having jquery things removing line-breaks.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -