2012년 1월 16일 월요일
[자바스크립트] 테이블 제어하기(숨기기&보여주기)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="javascript">
function ShowTable(wtable) {
eval(wtable).style.display="";
}
function HideTable(wtable) {
eval(wtable).style.display="none";
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<input type="button" value="A Table Show" onclick="ShowTable('a_table');">
<input type="button" value="A Table Hide" onclick="HideTable('a_table');">
<input type="button" value="B Table Show" onclick="ShowTable('b_table');">
<input type="button" value="B Table Hide" onclick="HideTable('b_table');">
<form name=form>
<table id="a_table" style="display:none;">
<tr><td>aa</td></tr>
</table>
<table id="b_table" style="display:none;">
<tr><td>bb</td></tr>
</table>
</form>
</body>
</html>
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기