Jmnote bot (토론 | 기여) 잔글 (봇: 자동으로 텍스트 교체 (-== 참고 자료 == +==참고==)) |
Jmnote bot (토론 | 기여) 잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight )) |
||
3번째 줄: | 3번째 줄: | ||
* 선택된 요소 내부의 내용을 비우는 jQuery 메소드 | * 선택된 요소 내부의 내용을 비우는 jQuery 메소드 | ||
< | <syntaxhighlight lang='html5'> | ||
<style> | <style> | ||
div { | div { | ||
19번째 줄: | 19번째 줄: | ||
$( ".hello" ).empty(); | $( ".hello" ).empty(); | ||
</script> | </script> | ||
</ | </syntaxhighlight> | ||
<jsfiddle>z5r0pf3j</jsfiddle> | <jsfiddle>z5r0pf3j</jsfiddle> | ||
2020년 11월 2일 (월) 02:53 기준 최신판
1 개요[ | ]
- jQuery .empty()
- 선택된 요소 내부의 내용을 비우는 jQuery 메소드
html
Copy
<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 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.