春風(fēng)博客

          春天里,百花香...

          導(dǎo)航

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

          統(tǒng)計(jì)

          公告

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

          Locations of visitors to this page

          常用鏈接

          留言簿(11)

          隨筆分類(224)

          隨筆檔案(126)

          個(gè)人軟件下載

          我的其它博客

          我的鄰居們

          最新隨筆

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          滑動(dòng)側(cè)邊菜單欄示例

          示例圖片:



          菜單項(xiàng)示例:
          <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>

          展開關(guān)閉菜單項(xiàng)的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>

           

          翻頁后保持點(diǎn)擊菜單項(xiàng)展開狀態(tài)的代碼示例:

          <% 
              
          String ulId=request.getParameter("ulId");
              
          if(ulId==null){
                  ulId
          ="poems";
              }
          %>
          <!-- 鏈接導(dǎo)航部分 -->
          <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 閱讀(4450) 評論(0)  編輯  收藏 所屬分類: HTML,CSS&JS

          sitinspring(http://www.aygfsteel.com)原創(chuàng),轉(zhuǎn)載請注明出處.
          主站蜘蛛池模板: 蓬溪县| 武威市| 冷水江市| 上思县| 博客| 法库县| 当阳市| 江永县| 株洲县| 大兴区| 北碚区| 车险| 错那县| 汤原县| 琼海市| 通海县| 泗阳县| 潮州市| 鲜城| 大名县| 寻甸| 绥滨县| 巴彦淖尔市| 玉林市| 卢氏县| 阳山县| 永定县| 鄂尔多斯市| 白山市| 霍城县| 雷山县| 石狮市| 怀宁县| 乌兰浩特市| 肇州县| 乐至县| 开化县| 图木舒克市| 习水县| 馆陶县| 萍乡市|