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

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
5번째 줄: 5번째 줄:


==예시==
==예시==
<source lang='html5'>
<syntaxhighlight lang='html5'>
<style>
<style>
p { background: orange; }
p { background: orange; }
17번째 줄: 17번째 줄:
$('p').prepend('친구야! ');
$('p').prepend('친구야! ');
</script>
</script>
</source>
</syntaxhighlight>
<jsfiddle height='180'>enz2q6en</jsfiddle>
<jsfiddle height='180'>enz2q6en</jsfiddle>



2020년 11월 2일 (월) 02:53 기준 최신판

1 개요[ | ]

jQuery .prepend()
  • 맨 앞에 내용을 추가하는 메소드

2 예시[ | ]

<style>
p { background: orange; }
</style>

<p>안녕</p>
<p>잘가</p>

<script src="//code.jquery.com/jquery.min.js"></script>
<script>
$('p').prepend('친구야! ');
</script>

3 같이 보기[ | ]

4 참고[ | ]

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