春風博客

          春天里,百花香...

          導航

          <2008年10月>
          2829301234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          統計

          公告

          MAIL: junglesong@gmail.com
          MSN: junglesong_5@hotmail.com

          Locations of visitors to this page

          常用鏈接

          留言簿(11)

          隨筆分類(224)

          隨筆檔案(126)

          個人軟件下載

          我的其它博客

          我的鄰居們

          最新隨筆

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          滑動側邊菜單欄示例

          示例圖片:



          菜單項示例:
          <div class="ulTitle"  onclick="showHideUL('poems')"/>詩歌</div>
          <ul id='poems' style='display:block'>
              
          <li><href="ShowPage?page=index&&ulId=poems&&aid=1">春歌</a></li>
              
          <li><href="ShowPage?page=index&&ulId=poems&&aid=3">俠客行</a></li>
              
          <li><href="ShowPage?page=index&&ulId=poems&&aid=4">南陵別兒童入京</a></li>
              
          <li><href="ShowPage?page=index&&ulId=poems&&aid=16">憶昔開元全盛日</a></li>
          </ul>

          展開關閉菜單項的JS控制代碼:
          <SCRIPT LANGUAGE="JavaScript">
          <!--
          function showHideUL(ulId){
              
          // 取得無序列表
              var ul=document.getElementById(ulId);
              
              
          // 原隱藏即顯示,原顯示即隱藏
              if(ul.style.display=="block" || ul.style.display=="" ){
                  ul.style.display
          ="none";
              }

              
          else{
                  ul.style.display
          ="block";
              }

          }

          //-->
          </SCRIPT>

           

          翻頁后保持點擊菜單項展開狀態的代碼示例:

          <% 
              
          String ulId=request.getParameter("ulId");
              
          if(ulId==null){
                  ulId
          ="poems";
              }
          %>
          <!-- 鏈接導航部分 -->
          <div class="ulTitle"  onclick="showHideUL('poems')"/>詩歌</div>
          <% 
              
          if( ulId.equals("poems")){
                  out.print(
          "<ul id='poems' style='display:block'>");
              }
              
          else{
                  out.print(
          "<ul id='poems' style='display:none'>");
              }
          %>
              
          <li><href="ShowPage?page=index&&ulId=poems&&aid=1">春歌</a></li>
              
          <li><href="ShowPage?page=index&&ulId=poems&&aid=3">俠客行</a></li>
              
          <li><href="ShowPage?page=index&&ulId=poems&&aid=4">南陵別兒童入京</a></li>
              
          <li><href="ShowPage?page=index&&ulId=poems&&aid=16">憶昔開元全盛日</a></li>
          </ul>


          源碼下載:
          http://www.aygfsteel.com/Files/sitinspring/SlideSidebar20081024121833.rar

          posted on 2008-10-24 12:25 sitinspring 閱讀(4433) 評論(0)  編輯  收藏 所屬分類: HTML,CSS&JS

          sitinspring(http://www.aygfsteel.com)原創,轉載請注明出處.
          主站蜘蛛池模板: 丹凤县| 华亭县| 鄱阳县| 浪卡子县| 易门县| 和平区| 浏阳市| 图木舒克市| 新沂市| 河源市| 镇坪县| 大城县| 山东| 昌黎县| 霸州市| 吴桥县| 隆德县| 中超| 旬邑县| 马尔康县| 绿春县| 唐河县| 诸城市| 东宁县| 刚察县| 德保县| 江山市| 隆昌县| 亳州市| 长子县| 新安县| 顺平县| 咸宁市| 中卫市| 万荣县| 萍乡市| 长泰县| 湘阴县| 梧州市| 云阳县| 册亨县|