본문 바로가기

study

jquery input 추가 제거 하기

<script>
 $(document).ready(function(){
  $("#btn_add").on('click',function(){
   $(".depth_div").append("<label><input type='text' name='depth'>개</label><br/>");
  });
  $("#btn_mi").on('click',function(){
   $(".depth_div label:last").remove();
   $(".depth_div br:last").remove();
  });
 });
 </script>

'study' 카테고리의 다른 글

JQuery Select Box 제어  (0) 2019.05.24
jqurey on 이벤트에 액션  (0) 2017.02.05
php 게시판 리스트  (0) 2017.01.21
PHP $_SERVER['PHP_SELF'] 취약점  (0) 2017.01.21
substr사용법  (0) 2017.01.21