Note that there are some explanatory texts on larger screens.

plurals
  1. POCount number of lines displayed (not newlines) in an HTML textarea without jQuery?
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/1760629/how-to-get-number-of-rows-in-textarea">How to get number of rows in &lt;textarea &gt;?</a> </p> </blockquote> <p>I have a <code>textarea</code> and I write <code>7 lines</code> in it with only <code>2 new line character</code> like below, just imagine the following code box is a <code>textarea</code> and only twice the enter key is pressed.</p> <pre><code> A text box, text field or text entry box is a kind of widget used when building a graphical user interface (GUI). A text box purpose is to allow the user to input text information to be used by the program. User-interface guidelines recommend a single-line text box when only one line of input is required, and a multi-line text box only if more than one line of input may be required. Non-editable text boxes can serve the purpose of simply displaying text. </code></pre> <p>After writing some more lines if now the <code>textarea line count</code> is <code>n</code>. How can I calculate the value of <code>n</code>?</p> <p>Please be clear before you answer the question. I don't want to count how many <code>new line characters</code> are there in my text like this one. <strong><em><a href="https://stackoverflow.com/q/2035910/1714907">How to get the number of lines in a textarea?</a></em></strong></p> <p>I want to count the number of lines as like as <strong>Microsoft Word</strong> count it from a passage.</p> <p><strong>no jQuery please...</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload