테이블속성연습

<html>
<head>
<script language="javascript">

<!--
function selectRow(idx) {
index = idx + 1;

// 각 테이블에서 짝수줄 홀수줄의 색을 달리하여 가독성을 높임
for(i=0; i<3; i++) {
if(i % 2 == 0) {
tblList.rows(i+1).style.backgroundColor = "ffffff";
} else {
tblList.rows(i+1).style.backgroundColor = "f4f4f4";
}
}

// 선택된 열의 색을 다른색으로 하여 반전
tblList.rows(index).style.backgroundColor = "eeeeff";

// 테스트로 Alert을 찍어봄
// 선택된 열의 숨어있는 부분의 정보를 읽어서 보여줌.
alert(
tblList.rows(index).cells(6).innerText + " " +
tblList.rows(index).cells(7).innerText + " " +
tblList.rows(index).cells(8).innerText
);

// IFRAME에 있을 경우로 가정하고 자신의 상위 프레임의 form에 값을 넣기 위해
// 상위 프레임의 setField 메소드를 호출
// parent.setField(
// tblList.rows(index).cells(6).innerText,
// tblList.rows(index).cells(7).innerText,
// tblList.rows(index).cells(8).innerText
// );

}

//-->
</script>
</head>
<body>
<table width="100%" id="tblList" cellspacing="1" cellpadding="0" bgcolor="d9d9d9">
<tr align="center" height="23">
<td width="16%" align="center">등록일</td>
<td width="18%" align="center">번호</td>
<td width="16%" align="center">이름</td>
<td width="16%" align="center">만료일</td>
<td width="16%" align="center">성별</td>
<td width="18%" align="center">비고</td>
<td style="visibility:hidden;position:absolute;"></td>
<td style="visibility:hidden;position:absolute;"></td>
<td style="visibility:hidden;position:absolute;"></td>
</tr>
<tr onClick="selectRow(0);" height="23" bgcolor="ffffff">
<td align="center">2004/10/10</td>
<td align="center">1</td>
<td align="center">김개똥</td>
<td align="center">2004/12/31</td>
<td align="center">남</td>
<td align="center"></td>
<td style="visibility:hidden;position:absolute;">20041010</td>
<td style="visibility:hidden;position:absolute;">20041231</td>
<td style="visibility:hidden;position:absolute;">M</td>
</tr>
<tr onClick="selectRow(1);" height="23" bgcolor="f4f4f4">
<td align="center">2004/08/01</td>
<td align="center">2</td>
<td align="center">박말숙</td>
<td align="center">2004/12/20</td>
<td align="center">여</td>
<td align="center"></td>
<td style="visibility:hidden;position:absolute;">20040801</td>
<td style="visibility:hidden;position:absolute;">20041220</td>
<td style="visibility:hidden;position:absolute;">F</td>
</tr>
<tr onClick="selectRow(2);" height="23" bgcolor="ffffff">
<td align="center">2004/05/01</td>
<td align="center">3</td>
<td align="center">한마리</td>
<td align="center">2004/12/31</td>
<td align="center">여</td>
<td align="center"></td>
<td style="visibility:hidden;position:absolute;">20040501</td>
<td style="visibility:hidden;position:absolute;">20041231</td>
<td style="visibility:hidden;position:absolute;">F</td>
</tr>
</table>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]</div>
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
19년 전 조회 1,655
19년 전 조회 1,845
19년 전 조회 1,896
19년 전 조회 1,948
19년 전 조회 2,698
19년 전 조회 5,321
19년 전 조회 1,727
19년 전 조회 1,576
19년 전 조회 1,439
19년 전 조회 1,599
19년 전 조회 1,532
19년 전 조회 1,451
19년 전 조회 1,460
19년 전 조회 1,382
19년 전 조회 1,447
19년 전 조회 2,813
19년 전 조회 3,831
19년 전 조회 5,217
19년 전 조회 1,385
19년 전 조회 4,548
19년 전 조회 2,989
19년 전 조회 1,496
19년 전 조회 2,693
19년 전 조회 3,620
19년 전 조회 1,789
19년 전 조회 3,796
19년 전 조회 1,880
19년 전 조회 3,779
19년 전 조회 3,423
19년 전 조회 4,212
19년 전 조회 4,057
19년 전 조회 1,882
19년 전 조회 1,846
19년 전 조회 4,280
19년 전 조회 2,682
19년 전 조회 2,550
19년 전 조회 2,409
19년 전 조회 1,980
19년 전 조회 2,568
19년 전 조회 2,202
19년 전 조회 1,848
19년 전 조회 1,976
19년 전 조회 1,447
19년 전 조회 1,701
19년 전 조회 2,840
19년 전 조회 1,952
19년 전 조회 3,224
19년 전 조회 3,136
19년 전 조회 2,247
19년 전 조회 1,795
19년 전 조회 2,836
19년 전 조회 2,906
19년 전 조회 4,023
19년 전 조회 1,987
19년 전 조회 2,636
19년 전 조회 2,344
19년 전 조회 3,472
19년 전 조회 1,426
19년 전 조회 1,493
19년 전 조회 1,775
19년 전 조회 2,217
19년 전 조회 1,839
19년 전 조회 1,705
19년 전 조회 2,117
19년 전 조회 2,210
19년 전 조회 4,968
19년 전 조회 2,337
19년 전 조회 3,203
19년 전 조회 2,649
19년 전 조회 2,415
19년 전 조회 4,709
19년 전 조회 2,565
19년 전 조회 2,411
19년 전 조회 1,951
19년 전 조회 1,735
19년 전 조회 3,359
19년 전 조회 2,331
19년 전 조회 6,160
19년 전 조회 2,024
19년 전 조회 1,904
19년 전 조회 2,708
19년 전 조회 1,815
19년 전 조회 2,282
19년 전 조회 2,115
19년 전 조회 3,564
19년 전 조회 2,578
19년 전 조회 2,754
19년 전 조회 4,373
19년 전 조회 3,557
19년 전 조회 2,315
19년 전 조회 4,302
19년 전 조회 3,276
19년 전 조회 4,141
19년 전 조회 2,002
19년 전 조회 2,217
19년 전 조회 2,145
19년 전 조회 3,354
19년 전 조회 2,723
19년 전 조회 3,511
19년 전 조회 2,690