테이블속성연습

<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,640
19년 전 조회 1,832
19년 전 조회 1,879
19년 전 조회 1,936
19년 전 조회 2,681
19년 전 조회 5,308
19년 전 조회 1,713
19년 전 조회 1,560
19년 전 조회 1,425
19년 전 조회 1,583
19년 전 조회 1,518
19년 전 조회 1,438
19년 전 조회 1,442
19년 전 조회 1,365
19년 전 조회 1,435
19년 전 조회 2,798
19년 전 조회 3,816
19년 전 조회 5,203
19년 전 조회 1,367
19년 전 조회 4,533
19년 전 조회 2,976
19년 전 조회 1,485
19년 전 조회 2,681
19년 전 조회 3,608
19년 전 조회 1,775
19년 전 조회 3,779
19년 전 조회 1,868
19년 전 조회 3,767
19년 전 조회 3,414
19년 전 조회 4,195
19년 전 조회 4,042
19년 전 조회 1,869
19년 전 조회 1,836
19년 전 조회 4,267
19년 전 조회 2,670
19년 전 조회 2,536
19년 전 조회 2,392
19년 전 조회 1,967
19년 전 조회 2,556
19년 전 조회 2,189
19년 전 조회 1,839
19년 전 조회 1,958
19년 전 조회 1,431
19년 전 조회 1,685
19년 전 조회 2,827
19년 전 조회 1,939
19년 전 조회 3,212
19년 전 조회 3,122
19년 전 조회 2,233
19년 전 조회 1,779
19년 전 조회 2,825
19년 전 조회 2,890
19년 전 조회 4,004
19년 전 조회 1,966
19년 전 조회 2,618
19년 전 조회 2,330
19년 전 조회 3,458
19년 전 조회 1,415
19년 전 조회 1,480
19년 전 조회 1,761
19년 전 조회 2,203
19년 전 조회 1,829
19년 전 조회 1,691
19년 전 조회 2,101
19년 전 조회 2,198
19년 전 조회 4,954
19년 전 조회 2,324
19년 전 조회 3,191
19년 전 조회 2,638
19년 전 조회 2,404
19년 전 조회 4,696
19년 전 조회 2,552
19년 전 조회 2,399
19년 전 조회 1,938
19년 전 조회 1,719
19년 전 조회 3,345
19년 전 조회 2,318
19년 전 조회 6,149
19년 전 조회 2,010
19년 전 조회 1,894
19년 전 조회 2,695
19년 전 조회 1,795
19년 전 조회 2,270
19년 전 조회 2,102
19년 전 조회 3,550
19년 전 조회 2,567
19년 전 조회 2,738
19년 전 조회 4,361
19년 전 조회 3,540
19년 전 조회 2,302
19년 전 조회 4,289
19년 전 조회 3,260
19년 전 조회 4,126
19년 전 조회 1,989
19년 전 조회 2,203
19년 전 조회 2,132
19년 전 조회 3,337
19년 전 조회 2,710
19년 전 조회 3,498
19년 전 조회 2,673
🐛 버그신고