JS左侧菜单-04
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 </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 </td> 35 <td bgcolor="#0A5C8E" width="8px"> 36 </td> 37 </tr> 38 </table>