아

텝메뉴 문의 드립니다.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>텝메뉴</title>
<script language="javascript">
 
function menu1(index) {
 if (navigator.userAgent.indexOf("MSIE") != -1) {
  if (index == 1) {
   t1.style.display = "";
   t2.style.display = "none";
   t3.style.display = "none";
   t4.style.display = "none";
  }
  else if(index == 2){
   t1.style.display = "none";
   t2.style.display = "";
   t3.style.display = "none";
   t4.style.display = "none";
  }
  else if(index == 3){
   t1.style.display = "none";
   t2.style.display = "none";
   t3.style.display = "";
   t4.style.display = "none";
  }
 
   else if(index == 4){
   t1.style.display = "none";
   t2.style.display = "none";
   t3.style.display = "none";
   t4.style.display = "";
  }
 }
}
</script>
</head>
<body>
<br /><br /><br />
 
<div id=t1>
 <table width="300" border="0">
  <tr height="30" align="center">
   <td width="150" bgcolor="#CCCCCC">MENU1</td>
   <td bgcolor="#EEEEEE"><a href="javascript:menu1(2);" onFocus="this.blur()">MENU2</a></td>
   <td bgcolor="#EEEEEE"><a href="javascript:menu1(3);" onFocus="this.blur()">MENU3</a></td>
   <td bgcolor="#EEEEEE"><a href="javascript:menu1(4);" onFocus="this.blur()">MENU4</a></td>
  </tr>
  <tr height="100">
   <td colspan="4" bgcolor="red">
    Content 1
   </td>
  </tr>
 </table>
</div>
 
<div id=t2 style="display:none">
 <table width="300" border="0">
  <tr height="30" align="center">
   <td width="150" bgcolor="#EEEEEE"><a href="javascript:menu1(1);" onFocus="this.blur()">MENU1</a></td>
   <td bgcolor="#CCCCCC">MENU2</td>
      <td width="150" bgcolor="#EEEEEE"><a href="javascript:menu1(3);" onFocus="this.blur()">MENU3</a></td>
         <td width="150" bgcolor="#EEEEEE"><a href="javascript:menu1(4);" onFocus="this.blur()">MENU4</a></td>
  </tr>
  <tr height="100">
   <td colspan="4" bgcolor="blue">
   Content 2
   </td>
  </tr>
 </table>
</div>


<div id=t3 style="display:none">
 <table width="300" border="0">
  <tr height="30" align="center">
   <td width="150" bgcolor="#EEEEEE"><a href="javascript:menu1(1);" onFocus="this.blur()">MENU1</a></td>
   <td bgcolor="#EEEEEE"><a href="javascript:menu1(2);" onFocus="this.blur()">MENU2</a></td>
      <td width="150"bgcolor="#CCCCCC">MENU3</td>
         <td width="150" bgcolor="#EEEEEE"><a href="javascript:menu1(4);" onFocus="this.blur()">MENU4</a></td>
  </tr>
  <tr height="100">
   <td colspan="4" bgcolor="black">
   Content 3
   </td>
  </tr>
 </table>
</div>

<div id=t4 style="display:none">
 <table width="300" border="0">
  <tr height="30" align="center">
   <td width="150" bgcolor="#EEEEEE"><a href="javascript:menu1(1);" onFocus="this.blur()">MENU1</a></td>
   <td bgcolor="#EEEEEE"><a href="javascript:menu1(2);" onFocus="this.blur()">MENU2</a></td>
      <td width="150" bgcolor="#EEEEEE"><a href="javascript:menu1(3);" onFocus="this.blur()">MENU3</a></td>
         <td width="150" bgcolor="#CCCCCC">MENU4</td>
  </tr>
  <tr height="100">
   <td colspan="4" bgcolor="black">
   Content 4
   </td>
  </tr>
 </table>
</div>
 
<br /><br /><br />
</body>
</html>   



이상 소스구요..
익스플로러 9에서는 보이는데 파이어폭스에서는 적용이 안되네요...
이유가 뭘까요..
답변 부탁드립니다...

댓글 1개

if (navigator.userAgent.indexOf("MSIE") != -1) {

조건이 걸려이네요. 익스일때만 작동해라 라는 식으로 저줄하고 하단의 } 를 삭제해서 조건을 빼주니 다른브라우저에서도 작동하네요.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,187건
+
제목 글쓴이 날짜 조회
12-12-27 조회 4,317
12-12-27 조회 4,147
12-12-27 조회 4,008
12-12-27 조회 6,299
12-12-27 조회 3,945
12-12-27 조회 4,504
12-12-27 조회 8,991
12-12-27 조회 6,392
12-12-26 조회 5,635
12-12-26 조회 6,288
12-12-26 조회 4,368
12-12-24 조회 3,905
12-12-22 조회 4,060
12-12-21 조회 4,388
12-12-21 조회 3,313
12-12-20 조회 6,150
12-12-20 조회 6,976
12-12-20 조회 5,523
12-12-20 조회 1.1만
12-12-20 조회 3,441
12-12-20 조회 1.2만
12-12-20 조회 2만
12-12-20 조회 4,463
12-12-19 조회 3,738
12-12-18 조회 9,289
12-12-18 조회 3,800
12-12-18 조회 4,019
12-12-17 조회 3,565
12-12-17 조회 3,718
12-12-17 조회 4,038
12-12-17 조회 4,135
12-12-16 조회 4,085
12-12-15 조회 6,643
12-12-15 조회 5,157
12-12-15 조회 7,382
12-12-15 조회 6,047
12-12-15 조회 7,310
12-12-14 조회 5,046
12-12-14 조회 4,164
12-12-14 조회 4,174
12-12-12 조회 5,002
12-12-12 조회 8,094
12-12-12 조회 3,838
12-12-12 조회 6,858
12-12-12 조회 8,272
12-12-12 조회 4,466
12-12-12 조회 5,308
12-12-11 조회 4,665
12-12-11 조회 3,617
12-12-11 조회 5,551
12-12-11 조회 4,801
12-12-10 조회 3,924
12-12-10 조회 3,328
12-12-10 조회 6,340
12-12-10 조회 4,779
12-12-10 조회 3,155
12-12-10 조회 3,560
12-12-10 조회 1.1만
12-12-10 조회 7,875
12-12-10 조회 1.1만
12-12-10 조회 3,357
12-12-07 조회 4,371
12-12-07 조회 4,558
12-12-06 조회 4,469
12-12-05 조회 5,607
12-12-05 조회 4,060
12-12-04 조회 4,385
12-12-04 조회 3,148
12-12-03 조회 4,253
12-12-03 조회 4,147
12-12-03 조회 1.6만
12-12-02 조회 4,306
12-12-02 조회 7,526
12-12-02 조회 4,765
12-12-02 조회 3,728
12-12-01 조회 4,216
12-12-01 조회 6,908
12-12-01 조회 4,216
12-11-30 조회 7,938
12-11-30 조회 3,804
12-11-29 조회 4,156
12-11-29 조회 3,928
12-11-29 조회 1.2만
12-11-28 조회 4,548
12-11-28 조회 5,797
12-11-28 조회 4,926
12-11-27 조회 5,075
12-11-26 조회 5,263
12-11-26 조회 3,861
12-11-26 조회 4,046
12-11-26 조회 2.1만
12-11-25 조회 5,500
12-11-25 조회 7,662
12-11-25 조회 4,412
12-11-25 조회 5,439
12-11-23 조회 4,950
12-11-23 조회 1.9만
12-11-22 조회 3,668
12-11-22 조회 4,082
12-11-22 조회 3,937