탭 2개를 같은페이지에썻는데.jpg
본문
탭 두개를 동시에 넣었는데 위에꺼는 마우스올리면 색깔이 변하는데
밑에 탭게시물은 변화가없네요.. 누르면 하이퍼링크는 잘 들어가지는데
저도 소스 제 나름대로 바꿔봣는데 저거는 어떻게 하지를 못하겠네요.
위에꺼 소스랑 밑에거 소스 첨부합니다.
마우스를 갖다댔을 시 밑에있는 탭도 색깔 변화를 주고싶습니다.
이미 이미지파일은 다 만들어놨구요 소스에 이미지는 완벽하게 넣어놨습니다.
도와주세용 ㅜㅜ
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$tab_img = "{$g4[path]}/tab_img"; //이미지 경로
$tab_width = "360"; //탭메뉴 폭
$tab_gr = "group"; //그룹명 또는 아무끼나 맴대루
$tab_bo1 = "kim01"; //처음 출력될 게시판 ID
$tab_bo2 = "kim02"; //공지 게시판 ID
$tab_bo3 = "kim04"; //질답 게시판 ID
$tab_bo4 = "kim05"; //질답 게시판 ID
?>
<head>
<script language="javascript">
function tab_img_change(t){
for(var i = 1; i <= 4; i++) {
img = document.getElementById('tab_bar'+i);
img.src = "<?=$tab_img?>/tab"+i+"_off.gif";
eval("document.getElementById('tab_view"+i+"')").style.display="none";
if ( t == i ) {
img.src = "<?=$tab_img?>/tab"+i+"_on.gif";
eval("document.getElementById('tab_view"+i+"')").style.display="";
}
}
}
</script>
<style>
.la { font-family:굴림; font-size:9pt; color:#636363;}
</style>
</head>
<table width='<?=$tab_width?>' cellpadding=0 cellspacing=0 border=0>
<tr>
<td width=74 background='<?=$tab_img?>/tabbar_bg.gif'>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo1?>">
<img id="tab_bar1" style="cursor:pointer;" onMouseOver="tab_img_change(1)" src="<?=$tab_img?>/tab1_off.gif" width="74" height="26" border="0">
</a>
</td>
<td width=74 background='<?=$tab_img?>/tabbar_bg.gif'>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo2?>">
<img id="tab_bar2" style="cursor:pointer;" onMouseOver="tab_img_change(2)" src="<?=$tab_img?>/tab2_off.gif" width="74" height="26" border="0">
</a>
</td>
<td width=74 background='<?=$tab_img?>/tabbar_bg.gif'>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo3?>">
<img id="tab_bar3" style="cursor:pointer;" onMouseOver="tab_img_change(3)" src="<?=$tab_img?>/tab3_off.gif" width="74" height="26" border="0">
</a>
</td>
<td width=74 background='<?=$tab_img?>/tabbar_bg.gif'>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo4?>">
<img id="tab_bar4" style="cursor:pointer;" onMouseOver="tab_img_change(4)" src="<?=$tab_img?>/tab4_off.gif" width="74" height="26" border="0">
</a>
</td>
<td width='<?=$tab_width-296?>' background='<?=$tab_img?>/tabbar_bg.gif' style='padding-top:3px;' class='la'><b><?//=$tab_gr?></b></td>
</tr>
<tr>
<td colspan='5'>
<div id="tab_view1">
<?=latest('bara_latest',$tab_bo1, 5, 100); //제목길이는 최신글 스킨에서 수정요 ?>
</div>
<div id="tab_view2" style="display: none">
<?=latest('bara_latest',$tab_bo2, 5, 100);?>
</div>
<div id="tab_view3" style="display: none">
<?=latest('bara_latest',$tab_bo3, 5, 100);?>
</div>
<div id="tab_view4" style="display: none">
<?=latest('bara_latest',$tab_bo4, 5, 100);?>
</div>
</td>
</tr>
</table>
<script>
tab_img_change(1);
</script>
이게 첫번째꺼
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$tab_img = "{$g4[path]}/tab_img"; //이미지 경로
$tab_width = "360"; //탭메뉴 폭
$tab_gr = "group"; //그룹명 또는 아무끼나 맴대루
$tab_bo1 = "kim06"; //처음 출력될 게시판 ID
$tab_bo2 = "kim07"; //공지 게시판 ID
$tab_bo3 = "kim08"; //질답 게시판 ID
$tab_bo4 = "kim09"; //질답 게시판 ID
?>
<head>
<script language="javascript">
function tab_img_change2(t){
for(var i = 5; i <= 8; i++) {
img = document.getElementById('tab_bar'+i);
img.src = "<?=$tab_img?>/tab"+i+"_off.gif";
eval("document.getElementById('tab_view"+i+"')").style.display="none";
if ( t == i ) {
img.src = "<?=$tab_img?>/tab"+i+"_on.gif";
eval("document.getElementById('tab_view"+i+"')").style.display="";
}
}
}
</script>
<style>
.la { font-family:굴림; font-size:9pt; color:#636363;}
</style>
</head>
<table width='<?=$tab_width?>' cellpadding=0 cellspacing=0 border=0>
<tr>
<td width=74 background='<?=$tab_img?>/tabbar_bg.gif'>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo1?>">
<img id="tab_bar1" style="cursor:pointer;" onMouseOver="tab_img_change2(5)" src="<?=$tab_img?>/tab5_off.gif" width="74" height="26" border="0">
</a>
</td>
<td width=74 background='<?=$tab_img?>/tabbar_bg.gif'>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo2?>">
<img id="tab_bar2" style="cursor:pointer;" onMouseOver="tab_img_change2(6)" src="<?=$tab_img?>/tab6_off.gif" width="74" height="26" border="0">
</a>
</td>
<td width=74 background='<?=$tab_img?>/tabbar_bg.gif'>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo3?>">
<img id="tab_bar3" style="cursor:pointer;" onMouseOver="tab_img_change2(7)" src="<?=$tab_img?>/tab7_off.gif" width="74" height="26" border="0">
</a>
</td>
<td width=74 background='<?=$tab_img?>/tabbar_bg.gif'>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo4?>">
<img id="tab_bar4" style="cursor:pointer;" onMouseOver="tab_img_change2(8)" src="<?=$tab_img?>/tab8_off.gif" width="74" height="26" border="0">
</a>
</td>
<td width='<?=$tab_width-296?>' background='<?=$tab_img?>/tabbar_bg.gif' style='padding-top:3px;' class='la'><b><?//=$tab_gr?></b></td>
</tr>
<tr>
<td colspan='5'>
<div id="tab_view1">
<?=latest('bara_latest',$tab_bo1, 5, 100); //제목길이는 최신글 스킨에서 수정요 ?>
</div>
<div id="tab_view2" style="display: none">
<?=latest('bara_latest',$tab_bo2, 5, 100);?>
</div>
<div id="tab_view3" style="display: none">
<?=latest('bara_latest',$tab_bo3, 5, 100);?>
</div>
<div id="tab_view4" style="display: none">
<?=latest('bara_latest',$tab_bo4, 5, 100);?>
</div>
</td>
</tr>
</table>
<script>
tab_img_change2(1);
</script>
이게 두번째꺼