How do I get the number of rows in the textarea input box?

is exactly how to get the number of lines of existing text in textarea.

Mar.21,2021

Don't say much else, just go to the code

<!DOCTYPE html>
<html>
<head>
  <title>Title</title>
  <script>
    window.onload = function () {
      function onGetLines() {
        var tmp = document.querySelector('-sharptest').value;
        var lines = tmp.split(/\r*\n/);

        var linesCount = lines.length - (navigator.userAgent.indexOf('MSIE') !== -1);
        console.log('', linesCount);
      }

      document.querySelector('-sharpgetLines').addEventListener('click', onGetLines, false)
    }
  </script>
</head>
<body>
<textarea name="test" id="test" cols="30" rows="10"></textarea>
<button id="getLines"></button>
</body>
</html>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b28a-4eed6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b28a-4eed6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?