[jQuery] Table Row 동적으로 추가하기
또 제목만 거창하게 쓰고.. 내용은 그다지 거창하지 않는 jQuery 소스 코드이다. 주어진 테이블에 동적으로 TR을 추가하는 것인데.. 추가와 함께 삭제하는 기능도 포함되어 있다. <table > <tbody> <tr> <th>옵션명</th> <th colspan=”2″>옵션항목(,로 구분)</th> </tr> <tr> <td><input type=”text” name=”spl_subject[]” value=”” class=”frm_input” size=”15″></td> <td><input type=”text” name=”spl[]” value=”” class=”frm_input” size=”50″></td> <td><button type=”button” id=”supply_table_create”>옵션목록생성</button></td> </tr> <tr> <td colspan=”3″><button type=”button” id=”add_supply_row”>입력필드추가</button></td> </tr> </tbody> </table> …