가능한 중복 : 나는 라인의 수에 따라 텍스트 영역의 높이를 변경하려면 어떻게
Autosizing textarea using prototype변경 높이가 자바 스크립트에서 텍스트 줄의 수에 따라
사용자가 입력하는 텍스트
사용자가 텍스트 영역의 텍스트를 두 줄 이상의 텍스트로 변경 한 경우 텍스트 영역은 줄 수에 맞게 높이를 변경하는 대신 스크롤바를 놓습니다.
라인 높이에 맞게 "32"을 조정<textarea>
This is the default text that will be displayed in the browser. When you change this text and add more lines to it the browser will not change the height of the textarea that this text is in rather it will add a scroll bar, which is not what I want.
<textarea>
@ FelixKling OP가 프로토 타입을 사용한다고 가정 할 때만, 그는 언급하지 않았습니다. – Chad