테이블속성연습

<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,758
19년 전 조회 1,947
19년 전 조회 1,989
19년 전 조회 2,041
19년 전 조회 2,789
19년 전 조회 5,421
19년 전 조회 1,826
19년 전 조회 1,672
19년 전 조회 1,524
19년 전 조회 1,686
19년 전 조회 1,629
19년 전 조회 1,548
19년 전 조회 1,549
19년 전 조회 1,477
19년 전 조회 1,542
19년 전 조회 2,900
19년 전 조회 3,924
19년 전 조회 5,313
19년 전 조회 1,471
19년 전 조회 4,637
19년 전 조회 3,072
19년 전 조회 1,579
19년 전 조회 2,783
19년 전 조회 3,715
19년 전 조회 1,882
19년 전 조회 3,891
19년 전 조회 1,975
19년 전 조회 3,865
19년 전 조회 3,517
19년 전 조회 4,296
19년 전 조회 4,143
19년 전 조회 1,968
19년 전 조회 1,935
19년 전 조회 4,351
19년 전 조회 2,762
19년 전 조회 2,632
19년 전 조회 2,486
19년 전 조회 2,072
19년 전 조회 2,653
19년 전 조회 2,287
19년 전 조회 1,936
19년 전 조회 2,072
19년 전 조회 1,522
19년 전 조회 1,779
19년 전 조회 2,922
19년 전 조회 2,030
19년 전 조회 3,299
19년 전 조회 3,218
19년 전 조회 2,327
19년 전 조회 1,871
19년 전 조회 2,912
19년 전 조회 2,986
19년 전 조회 4,100
19년 전 조회 2,070
19년 전 조회 2,717
19년 전 조회 2,427
19년 전 조회 3,556
19년 전 조회 1,513
19년 전 조회 1,571
19년 전 조회 1,864
19년 전 조회 2,300
19년 전 조회 1,918
19년 전 조회 1,801
19년 전 조회 2,196
19년 전 조회 2,286
19년 전 조회 5,045
19년 전 조회 2,418
19년 전 조회 3,285
19년 전 조회 2,742
19년 전 조회 2,507
19년 전 조회 4,787
19년 전 조회 2,647
19년 전 조회 2,494
19년 전 조회 2,033
19년 전 조회 1,818
19년 전 조회 3,433
19년 전 조회 2,413
19년 전 조회 6,239
19년 전 조회 2,103
19년 전 조회 1,999
19년 전 조회 2,799
19년 전 조회 1,890
19년 전 조회 2,366
19년 전 조회 2,194
19년 전 조회 3,640
19년 전 조회 2,650
19년 전 조회 2,838
19년 전 조회 4,452
19년 전 조회 3,621
19년 전 조회 2,402
19년 전 조회 4,382
19년 전 조회 3,361
19년 전 조회 4,219
19년 전 조회 2,093
19년 전 조회 2,295
19년 전 조회 2,221
19년 전 조회 3,426
19년 전 조회 2,804
19년 전 조회 3,597
19년 전 조회 2,765