Tuesday, April 23, 2013

How to get line number in textarea by Javascript?

textarea.value.split(/\r?\n|\r/).length + 1

No comments:

Post a Comment