<Table width="324" border="0" cellpadding="0" cellspacing="0" align="center">
<tr height="1"><td bgcolor="#0b7b8f"></td></tr>
<tr><td>
<Table width="100%" border="0" cellpadding="0" cellspacing="0" style="color:#555555;font-weight:bold;">
<Tr height="20">
<td width="10%" align="right"><a href="Javascript:;" onClick="AddTable('cash_table',0)">추가</a></td>
</Tr></Table></td></tr>
</Table>
<Table width='324' border='0' cellpadding='0' cellspacing='0' align='center' id='cash_table' bgcolor='#add1d6'>
<tr height="32">
<td align='center' width='322'>
<Table width='322' border='0' cellpadding='0' cellspacing='1' align='center'>
<tr align='center' height='30' bgcolor='#FFFFFF'>
<td><input type='text' class=text_input name='c_in_summary[]' value=''></td>
<td><input type='text' class=text_input name='c_in_amount[]' value=''></td>
<td><input type='text' class=text_input name='c_in_remark[]' value=''></td>
</tr>
</Table>
</td>
<td></td>
</tr>
</Table>
<Script Language="JavaScript">
var cnt = 2;
function AddTable(tbl_name, onevent) {
var intc = tbl_name.substring(0,1);
var tbl = document.getElementById(tbl_name);
var trow = tbl.insertRow(-1);
trow.height = 32;
trow.id = cnt;
var tcol1 = trow.insertCell(-1);
tcol1.innerHTML = "<Table width='322' border='0' cellpadding='0' cellspacing='1' align='center'>\n<tr align='center' height='30' bgcolor='#FFFFFF'>\n<td><input type='text' class=text_input name='"+intc+"_in_summary[]' value=''></td>\n<td><input type='text' class=text_input name='"+intc+"_in_amount[]' value=''></td>\n<td><input type='text' class=text_input name='"+intc+"_in_remark[]' value=''></td>\n</tr>\n</Table>\n";
var tcol4 = trow.insertCell(-1);
tcol4.vAlign = "top";
tcol4.innerHTML = "<div style='position:absolute;width:20px;height:30px;'> </div><div id='del_"+cnt+"' style='position:absolute;border:1px solid #add1d6;color:#add1d6;cursor:hand;height:32px;display:none;'>×</div>";
tcol4.onmouseover=function(){
trow.style.backgroundColor="#F4F4F4";
document.getElementById("del_"+trow.id).style.display = "";
}
tcol4.onmouseout =function(){
trow.style.backgroundColor="#add1d6";
document.getElementById("del_"+trow.id).style.display = "none";
}
tcol4.onclick =function(){
tbl.deleteRow(trow.rowIndex);
}
cnt++;
}
</script>
미리보기는 링크를 이용하세여~~
추가 후 삭제는 셀 끝 부분에 마우스 가져가시면 삭제 버튼 나옵니다~
<tr height="1"><td bgcolor="#0b7b8f"></td></tr>
<tr><td>
<Table width="100%" border="0" cellpadding="0" cellspacing="0" style="color:#555555;font-weight:bold;">
<Tr height="20">
<td width="10%" align="right"><a href="Javascript:;" onClick="AddTable('cash_table',0)">추가</a></td>
</Tr></Table></td></tr>
</Table>
<Table width='324' border='0' cellpadding='0' cellspacing='0' align='center' id='cash_table' bgcolor='#add1d6'>
<tr height="32">
<td align='center' width='322'>
<Table width='322' border='0' cellpadding='0' cellspacing='1' align='center'>
<tr align='center' height='30' bgcolor='#FFFFFF'>
<td><input type='text' class=text_input name='c_in_summary[]' value=''></td>
<td><input type='text' class=text_input name='c_in_amount[]' value=''></td>
<td><input type='text' class=text_input name='c_in_remark[]' value=''></td>
</tr>
</Table>
</td>
<td></td>
</tr>
</Table>
<Script Language="JavaScript">
var cnt = 2;
function AddTable(tbl_name, onevent) {
var intc = tbl_name.substring(0,1);
var tbl = document.getElementById(tbl_name);
var trow = tbl.insertRow(-1);
trow.height = 32;
trow.id = cnt;
var tcol1 = trow.insertCell(-1);
tcol1.innerHTML = "<Table width='322' border='0' cellpadding='0' cellspacing='1' align='center'>\n<tr align='center' height='30' bgcolor='#FFFFFF'>\n<td><input type='text' class=text_input name='"+intc+"_in_summary[]' value=''></td>\n<td><input type='text' class=text_input name='"+intc+"_in_amount[]' value=''></td>\n<td><input type='text' class=text_input name='"+intc+"_in_remark[]' value=''></td>\n</tr>\n</Table>\n";
var tcol4 = trow.insertCell(-1);
tcol4.vAlign = "top";
tcol4.innerHTML = "<div style='position:absolute;width:20px;height:30px;'> </div><div id='del_"+cnt+"' style='position:absolute;border:1px solid #add1d6;color:#add1d6;cursor:hand;height:32px;display:none;'>×</div>";
tcol4.onmouseover=function(){
trow.style.backgroundColor="#F4F4F4";
document.getElementById("del_"+trow.id).style.display = "";
}
tcol4.onmouseout =function(){
trow.style.backgroundColor="#add1d6";
document.getElementById("del_"+trow.id).style.display = "none";
}
tcol4.onclick =function(){
tbl.deleteRow(trow.rowIndex);
}
cnt++;
}
</script>
미리보기는 링크를 이용하세여~~
추가 후 삭제는 셀 끝 부분에 마우스 가져가시면 삭제 버튼 나옵니다~
[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7930 | 9년 전 | 478 | ||
| 7929 | 9년 전 | 411 | ||
| 7928 | 9년 전 | 486 | ||
| 7927 | 9년 전 | 391 | ||
| 7926 | 9년 전 | 699 | ||
| 7925 | 9년 전 | 423 | ||
| 7924 | 9년 전 | 409 | ||
| 7923 | 9년 전 | 395 | ||
| 7922 | 9년 전 | 421 | ||
| 7921 | 9년 전 | 437 | ||
| 7920 | 9년 전 | 345 | ||
| 7919 | 9년 전 | 357 | ||
| 7918 | 9년 전 | 510 | ||
| 7917 | 9년 전 | 363 | ||
| 7916 | 9년 전 | 453 | ||
| 7915 | 9년 전 | 470 | ||
| 7914 | 9년 전 | 477 | ||
| 7913 | 9년 전 | 657 | ||
| 7912 | 9년 전 | 490 | ||
| 7911 | 9년 전 | 411 | ||
| 7910 | 9년 전 | 461 | ||
| 7909 | 9년 전 | 576 | ||
| 7908 | 9년 전 | 512 | ||
| 7907 | 9년 전 | 449 | ||
| 7906 | 9년 전 | 470 | ||
| 7905 | 9년 전 | 436 | ||
| 7904 | 9년 전 | 422 | ||
| 7903 | 9년 전 | 434 | ||
| 7902 | 9년 전 | 608 | ||
| 7901 |
|
9년 전 | 773 | |
| 7900 | 9년 전 | 667 | ||
| 7899 | 9년 전 | 452 | ||
| 7898 | 9년 전 | 451 | ||
| 7897 | 9년 전 | 408 | ||
| 7896 | 9년 전 | 423 | ||
| 7895 | 9년 전 | 544 | ||
| 7894 | 9년 전 | 450 | ||
| 7893 | 9년 전 | 428 | ||
| 7892 | 9년 전 | 462 | ||
| 7891 | 9년 전 | 818 | ||
| 7890 | 9년 전 | 1241 | ||
| 7889 | 9년 전 | 775 | ||
| 7888 |
limsy1987
|
9년 전 | 594 | |
| 7887 | 9년 전 | 639 | ||
| 7886 | 9년 전 | 526 | ||
| 7885 | 9년 전 | 498 | ||
| 7884 | 9년 전 | 486 | ||
| 7883 | 9년 전 | 494 | ||
| 7882 | 9년 전 | 555 | ||
| 7881 | 9년 전 | 532 | ||
| 7880 | 9년 전 | 649 | ||
| 7879 | 9년 전 | 531 | ||
| 7878 | 9년 전 | 1303 | ||
| 7877 | 9년 전 | 828 | ||
| 7876 | 9년 전 | 568 | ||
| 7875 | 9년 전 | 641 | ||
| 7874 |
|
9년 전 | 838 | |
| 7873 | 10년 전 | 564 | ||
| 7872 | 10년 전 | 732 | ||
| 7871 | 10년 전 | 547 | ||
| 7870 | 10년 전 | 667 | ||
| 7869 | 10년 전 | 482 | ||
| 7868 | 10년 전 | 523 | ||
| 7867 | 10년 전 | 529 | ||
| 7866 | 10년 전 | 586 | ||
| 7865 | 10년 전 | 531 | ||
| 7864 | 10년 전 | 585 | ||
| 7863 | 10년 전 | 580 | ||
| 7862 | 10년 전 | 548 | ||
| 7861 | 10년 전 | 719 | ||
| 7860 | 10년 전 | 697 | ||
| 7859 | 10년 전 | 468 | ||
| 7858 | 10년 전 | 776 | ||
| 7857 | 10년 전 | 1162 | ||
| 7856 | 10년 전 | 588 | ||
| 7855 | 10년 전 | 825 | ||
| 7854 | 10년 전 | 759 | ||
| 7853 | 10년 전 | 665 | ||
| 7852 | 10년 전 | 584 | ||
| 7851 | 10년 전 | 586 | ||
| 7850 | 10년 전 | 659 | ||
| 7849 | 10년 전 | 428 | ||
| 7848 | 10년 전 | 494 | ||
| 7847 | 10년 전 | 734 | ||
| 7846 | 10년 전 | 516 | ||
| 7845 | 10년 전 | 495 | ||
| 7844 | 10년 전 | 457 | ||
| 7843 | 10년 전 | 495 | ||
| 7842 | 10년 전 | 482 | ||
| 7841 | 10년 전 | 448 | ||
| 7840 | 10년 전 | 465 | ||
| 7839 | 10년 전 | 517 | ||
| 7838 | 10년 전 | 578 | ||
| 7837 | 10년 전 | 407 | ||
| 7836 | 10년 전 | 452 | ||
| 7835 | 10년 전 | 538 | ||
| 7834 |
|
10년 전 | 1236 | |
| 7833 | 10년 전 | 500 | ||
| 7832 | 10년 전 | 477 | ||
| 7831 | 10년 전 | 642 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기