var countSymbols = document.getElementById('text_').innerText.length; var rows = countSymbols/59 + 1; textArea.rows =rows;