<script type="text/javascript" src="/js/jquery-1.3.2.js"></script>
<script language="JavaScript">
## 행 추가
function addRow(){
var template = $("#template");
$("#MainTable").append($(template).val());
}
## 행 삭제
function deleteRow(obj){
$(obj).parent().remove();
}
</script>
<body>
<table id="MainTable">
</table>
</body>
<textarea id="template" style="display:none;">
<tr>
<td>1</td>
<td onclick="deleteRow(this);" style="cursor:hand;">2</td>
</tr>
</textarea>
댓글 없음:
댓글 쓰기