<script>
function tab ( name ) {
div_board1 = document.getElementById('board1');
div_board2 = document.getElementById('board2');
div_board3 = document.getElementById('board3');
div_board4 = document.getElementById('board4');
div_board5 = document.getElementById('board5');
if ( name == 'board1' ) {
div_board1.style.display = 'block';
div_board2.style.display = 'none';
div_board3.style.display = 'none';
div_board4.style.display = 'none';
div_board5.style.display = 'none';
}
if ( name == 'board2' ) {
div_board1.style.display = 'none';
div_board2.style.display = 'block';
div_board3.style.display = 'none';
div_board4.style.display = 'none';
div_board5.style.display = 'none';
}
if ( name == 'board3' ) {
div_board1.style.display = 'none';
div_board2.style.display = 'none';
div_board3.style.display = 'block';
div_board4.style.display = 'none';
div_board5.style.display = 'none';
}
if ( name == 'board4' ) {
div_board1.style.display = 'none';
div_board2.style.display = 'none';
div_board3.style.display = 'none';
div_board4.style.display = 'block';
div_board5.style.display = 'none';
}
if ( name == 'board5' ) {
div_board1.style.display = 'none';
div_board2.style.display = 'none';
div_board3.style.display = 'none';
div_board4.style.display = 'none';
div_board5.style.display = 'block';
}
}
</script>
<div id="board1" style="display:block;">
</div>
<div id="board2" style="display:none;">
</div>
<div id="board3" style="display:none;">
</div>
<div id="board4" style="display:none;">
</div>
<div id="board5" style="display:none;">
</div>
'PROGRAM > JAVASCRIPT' 카테고리의 다른 글
복사 금지 스크립트 (0) | 2013.01.28 |
---|---|
체크박스 체크해야 글 입력 (0) | 2013.01.25 |
팝업시 부모창 새로고침 (0) | 2013.01.24 |
전에 것보다 간단한 탭메뉴 (0) | 2013.01.07 |
새로고침, 창닫기 (0) | 2012.12.20 |