 |
|
|  |
| 체크박스를 선택하면 해당 테이블셀(TR) 색상을 변경합니다. |
|
|
 |
19년 전 |
<html>
<head>
<title>http://www.xtx.kr</title>
<script>
function check(it) {
tr = it.parentNode.parentNode;
tr.style.backgroundColor = (it.checked) ? "gold" : "white";
}
</script>
</head>
<body>
<form onsubmit="return false">
<table class="test" border=1 width=400>
<tr><td width=20><input type="checkbox" onclick="check(this)"></td><td>blub-B</td><td>blub-B</td></tr>
<tr><td><input type="checkbox" onclick="check(this)"></td><td>blub-B</td><td>blub-B</td></tr>
<tr><td><input type="checkbox" onclick="check(this)"></td><td>blub-B</td><td>blub-B</td></tr>
<tr><td><input type="checkbox" onclick="check(this)"></td><td>blub-B</td><td>blub-B</td></tr>
</table>
</form>
</body>
</html> |
|
추천 : 502 |
추천
목록
|
|
|  |
|