JS 새 요소 그룹 만 들 기 및 현재 요소 그룹 삭제

1418 단어

$(document).ready(function(){
  $("#add_guest").click(function(){
<span style="white-space:pre">	</span>  $("#YK").append("<li >  :<input name='plan_user_name[]' type='text' id='plan_user_name[]' size='9'>&nbsp;&nbsp;<select name='plan_user_sex[]' id='plan_user_sex[]'><option value='  '>—  —</option><option value=' '> </option><option value=' '> </option></select>&nbsp;&nbsp; <select name='plan_user_sort[]' id='plan_user_sort[]'><option value='  '>—    —</option><option value='   '>   </option><option value='   '>   </option><option value='  '>  </option><option value='   '>   </option><option value='     '>     </option><option value='  '>  </option></select>&nbsp; &nbsp;    :<input type='text' name='plan_user_haoma[]' id='plan_user_haoma[]'>&nbsp;&nbsp;  :<input name='plan_user_tel[]' type='text' id='plan_user_tel[]' size='13'>&nbsp;  :<input type='text' name='plan_user_beizhu[]' id='plan_user_beizhu[]' maxlength='20'><input type='button' name='del[]' id='del[]' value='  ' οnclick='dl(this.parentNode)'><BR></li>");
  });
 });
function dl(obj){
obj.parentNode.removeChild(obj);
}

좋은 웹페이지 즐겨찾기