JQuery .empty()

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:53 판 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

jQuery .empty()
  • 선택된 요소 내부의 내용을 비우는 jQuery 메소드
<style>
div {
	margin: 5px;
	height:20px;
	background: pink;
}
</style>
<script src='//code.jquery.com/jquery.min.js'></script>

<div class="hello">안녕</div>
<div class="goodbye">잘가</div>

<script>
$( ".hello" ).empty();
</script>

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}