순환 디스플레이 전환

3961 단어 순환
 1 // 

 2             function openP(_id)

 3                 {

 4                    var select_id = parseInt(_id.replace("month",""));

 5                    for (i=1;i<=4;i++)

 6                    {

 7                       if (i==select_id)

 8                       {

 9                           document.getElementById("month"+i).style.display = "block";

10                       }

11                       else

12                       {

13                          document.getElementById("month"+i).style.display = "none";

14                       }

15                    }

16                 }

호출 방법:
1 <a href="javaScript: ;" onmouseover="openP('month1')"></a>

2                     <a href="javaScript: ;" onmouseover="openP('month2')"></a>

3                     <a href="javaScript: ;" onmouseover="openP('month3')"></a>

4                     <a href="javaScript: ;" onmouseover="openP('month4')"></a>

좋은 웹페이지 즐겨찾기