JS 왼쪽 메뉴 - 04

4718 단어 js
 1 <script language="javascript" type="text/javascript">
 2     function HideShow()
 3     {
 4         var alt = document.getElementById('switchPoint').alt;
 5         var src = document.getElementById('switchPoint').src;
 6         if (alt == "  ") 
 7         {
 8             document.getElementById('switchPoint').alt = "  ";
 9             document.getElementById('switchPoint').src = src.substring(0, src.length - 8) + "show.jpg";
10             document.all("leftFrame").style.display = "none";
11         } 
12         else 
13         {
14             document.getElementById('switchPoint').alt = "  ";
15             document.getElementById('switchPoint').src = src.substring(0, src.length - 8) + "hide.jpg";
16             document.all("leftFrame").style.display = "";
17         }
18     }
19 </script>
20 
21 
22 <table border="0" cellpadding="0" cellspacing="0" width="100%" style="height: 100%">
23                 <tr>
24                     <td bgcolor="#0A5C8E" width="8px">
25                         &nbsp;</td>
26                     <td width="170px" valign="top" id="leftFrame">   
27                         <uc2:left ID="left1" runat="server" />
28                     </td>
29                     <td bgcolor="#0A5C8E" width="10px">
30                         <img src="images/hide.jpg" alt="  " id="switchPoint" onclick="HideShow()" style="cursor:hand"/>
31                     </td>
32                     <td align="left" valign="top" height="620px">
33                         <iframe id="rightFrame" name="main" frameborder="0" scrolling="yes"  src="main.aspx" height="100%" width="100%" ></iframe>
34                         &nbsp;</td>
35                     <td bgcolor="#0A5C8E" width="8px">
36                         &nbsp;</td>
37                 </tr>
38 </table>

좋은 웹페이지 즐겨찾기