","url":"https://sir.kr/boards/tip/10810","author":{"@type":"Person","name":"senseme","url":"https://sir.kr/profile/fd8d8956-5b99-4cbc-9e08-367f8488486f"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"datePublished":"2013-02-24T23:36:16+09:00","dateModified":"2013-04-05T09:22:31+09:00","comment":[{"@type":"Comment","text":"감사요~","author":{"@type":"Person","name":"쉽다zzz"},"datePublished":"2013-04-05T09:22:30+09:00"},{"@type":"Comment","text":"감사요~","author":{"@type":"Person","name":"쉽다zzz"},"datePublished":"2013-04-05T09:22:31+09:00"}]}
s

자동으로 textarea 크기 조절하기

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
</head>

<body>
<textarea name="textarea" scol cols="50" rows="5" onKeyDown="setLine( this )"></textarea>

<script language="javascript">
       function setLine( txa ){
              line = 5 //기본 줄 수
       
              new_line = txa.value.split( "\n" ).length + 1;
              if( new_line < line ) new_line = line;

              txa.rows = new_line;
       }

</script>
</body>
</html>
|

댓글 2개

댓글을 작성하시려면 로그인이 필요합니다.

팁게시판

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
13년 전 조회 3,342
13년 전 조회 2,694
13년 전 조회 5,346
13년 전 조회 3,422
13년 전 조회 1.3만
13년 전 조회 3,931
13년 전 조회 1,505
13년 전 조회 1,277
13년 전 조회 3,253
13년 전 조회 887
13년 전 조회 1,807
13년 전 조회 3,658
13년 전 조회 5,287
13년 전 조회 1,463
13년 전 조회 790
13년 전 조회 2,770
13년 전 조회 2,507
13년 전 조회 1,532
13년 전 조회 2,948
13년 전 조회 6,553
13년 전 조회 2,183
13년 전 조회 1,914
13년 전 조회 810
13년 전 조회 1,836
13년 전 조회 1,296