"JQuery .empty()"의 두 판 사이의 차이

(새 문서: ==개요== ;jQuery .empty() * 선택된 요소 내부의 내용을 비우는 jQuery 메소드 <source lang='html5'> <style> div { margin: 5px; height:20px; background: pink; } </s...)
 
27번째 줄: 27번째 줄:
==참고 자료==
==참고 자료==
* https://api.jquery.com/empty/
* https://api.jquery.com/empty/
* http://www.w3schools.com/jquery/html_empty.asp


[[분류: jQuery]]
[[분류: jQuery]]

2015년 12월 30일 (수) 23:45 판

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 }}