r

mozilla DHTML ROWS INSERT & DELETE

DHTML ROW 추가삭제 우측 이미지 선택 => 로우추가이미지
<html> <head> <title>mozilla DHTML ROWS INSERT & DELETE</title> <meta http-equiv="Content-Type" content="text/html; charset=euc-kr"> <script lang="javascript"> function init(){ rowAdd(); } function rowDelete(index) { alert("삭제 : " + index); ABCD.deleteRow(index); } function rowAdd() { var rowcnt =document.all.ABCD.rows.length; var r1; var c1; var strC1; var sf_form = document.form; r1 = ABCD.insertRow(rowcnt); c1 = r1.insertCell(0); strC1 ="<table height=5 border=0 cellpadding=0 cellspacing=0>"; strC1 +=" <tr><td>"; strC1 +=" </td></tr>"; strC1 +=" </table>"; strC1 +="<table width=655 border=0 cellpadding=0 cellspacing=1 border=1> "; strC1 +=" <tr> "; strC1 +=" <td height=20 width=15% align=center >코드선택 </td> "; strC1 +=" <td width=20% >"; strC1 +=" <select name=test_code style=width:100%> "; strC1 +=" <option value='0' align=center> - 구분코드 -"; strC1 +=" <option value='a'> a : TEST a"; strC1 +=" <option value='b'> b : TEST b"; strC1 +=" <option value='c'> c : TEST c"; strC1 +=" </select> "; strC1 +=" </td> "; strC1 +=" <td height=20 width=15% align=center>코드설명 </td> "; strC1 +=" <td width=50%> <input type=text name=test_name size=20 > "; if(rowcnt>0) { strC1+=" <img align=absmiddle src=del.gif border=0 name='sakje' value='삭제' alt='삭제이미지 : "+rowcnt+"' onClick='rowDelete(this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.rowIndex);'>"; } strC1 +=" </td> "; strC1 +=" </tr> "; strC1 +="</table> "; c1.innerHTML = strC1; } function changeSelect() { var sf_form = document.form; var cols = document.all.ABCD.rows.length-1; for(i=0; i<cols; i++) { rowDelete(1); } rowAdd(); } </script> </head> <body topmargin="0" leftmargin="12" onLoad="javascript:init();" > <form name=form> <table id=ABCD width=655 cellpadding="0" cellspacing="0" border="1"> <tr><td height="20" width="90%" align="center"></td></tr> <tr> <td height="20" width="90%" align="center">DHTML ROW 추가삭제 우측 이미지 선택 => <img align=absmiddle src=add.gif border=0 alt="로우추가이미지" onClick=javascript:rowAdd();></td> </tr> </table> </form> </body> </html>
[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
20년 전 조회 2,755
20년 전 조회 2,525
20년 전 조회 3,030
20년 전 조회 3,118
20년 전 조회 3,194
20년 전 조회 2,714
20년 전 조회 3,098
20년 전 조회 2,623
20년 전 조회 2,291
20년 전 조회 2,846
20년 전 조회 2,552
20년 전 조회 2,611
20년 전 조회 3,865
20년 전 조회 3,339
20년 전 조회 5,081
20년 전 조회 2,490
20년 전 조회 4,575
20년 전 조회 3,177
20년 전 조회 2,950
20년 전 조회 3,807
20년 전 조회 2,716
20년 전 조회 3,793
20년 전 조회 4,079
20년 전 조회 3,497
20년 전 조회 3,552
20년 전 조회 4,167
20년 전 조회 2,420
20년 전 조회 5,149
20년 전 조회 3,716
20년 전 조회 2,668
20년 전 조회 2,352
20년 전 조회 2,804
20년 전 조회 3,088
20년 전 조회 2,858
bbbking
20년 전 조회 5,836
20년 전 조회 2,766
bbbking
20년 전 조회 4,342
20년 전 조회 2,218
20년 전 조회 7,392
20년 전 조회 2,477
20년 전 조회 3,554
20년 전 조회 4,366
20년 전 조회 2,700
20년 전 조회 3,975
20년 전 조회 3,142
20년 전 조회 4,150
20년 전 조회 5,177
20년 전 조회 4,297
20년 전 조회 5,912
20년 전 조회 2,112
20년 전 조회 3,388
20년 전 조회 3,602
20년 전 조회 2,992
20년 전 조회 2,505
20년 전 조회 4,724
20년 전 조회 2,350
20년 전 조회 2,330
20년 전 조회 1,953
20년 전 조회 1,753
20년 전 조회 3,823
20년 전 조회 4,902
20년 전 조회 2,543
20년 전 조회 3,212
20년 전 조회 5,903
20년 전 조회 2,907
20년 전 조회 2,364
20년 전 조회 4,632
20년 전 조회 2,720
20년 전 조회 2,306
20년 전 조회 2,821
20년 전 조회 2,628
20년 전 조회 2,945
20년 전 조회 3,393
20년 전 조회 2,729
20년 전 조회 4,798
20년 전 조회 3,328
20년 전 조회 4,611
20년 전 조회 3,069
20년 전 조회 4,189
20년 전 조회 4,436
20년 전 조회 7,107
20년 전 조회 3,938
20년 전 조회 2,826
20년 전 조회 4,459
20년 전 조회 2,279
20년 전 조회 4,390
20년 전 조회 3,851
20년 전 조회 2,653
20년 전 조회 4,898
bbbking
20년 전 조회 2,599
20년 전 조회 4,562
20년 전 조회 3,612
20년 전 조회 3,637
20년 전 조회 3,878
20년 전 조회 3,259
20년 전 조회 5,984
20년 전 조회 2,995
20년 전 조회 5,897
bbbking
20년 전 조회 2,415
bbbking
20년 전 조회 1,832