<html>
<head>
<script type="text/ javascript ">
tri = -1;
function mycreate() {
var tbl=document.all.mytable;
var tr=tbl.insertRow();
var td=tr.insertCell();
<head>
<script type="text/ javascript ">
tri = -1;
function mycreate() {
var tbl=document.all.mytable;
var tr=tbl.insertRow();
var td=tr.insertCell();
var html="<td><input class=normal style='text-align:right' size=15 name=bar_code>"
+"<input type=button value=삭제 onclick=myremove(this)><td>";
td.innerHTML=html;
tri ++;
}
function myremove(obj) {
//obj.parentNode.parentNode는 삭제버튼이 해당하는 tr을 의미함
obj.parentNode.parentNode.removeNode(true);
tri--;
}
</script>
</head>
<body>
<input type=button value=생성 onclick=mycreate()>
<table id=mytable border=1></table>
</body>
</html>