<div class="codetitle"> <span><a style="CURSOR: pointer" data="68761" class="copybut" id="copybut68761" onclick="doCopy('code68761')"><u>複製程式碼</u></a></span>程式碼如下:</div> <div class="codebody" id="code68761"> <br><title>導覽-點選彈出內容</title> <br><br><title>導覽-點選彈出內容</title> <br> <style type="text/css"><BR>.navgation{margin:0;padding:0;list-style-type:none;position:relative;}<BR>.navgation li {float :left;} <BR>.navgation a{padding:3px 6px;background-color:orange;color:white;text-decoration:none;float:left;height:24px;}<BR>.navgation a:hover {背景顏色:白色;顏色:藍色;文字裝飾:底線;}<BR>.navgation div{display:none;position:absolute;top:30px;}<BR></style> <br> <br> <br> <script type="text/javascript"><BR> $(document).ready(function () {< ".navgation input").each(function () {<BR> var this_div = $(".navgation div") input") .index(this);<BR> $(this).click(<BR> function () { this_div.eq(_inx). SlideToggle(); }<BR> );<BR> });<BR> });<BR> </script><br><br> <br> <br> <div> <br> <ul class="navgation"> <br> 這裡下拉內容1</ul> </div> <br> <br> <div>這裡下拉內容2</div> <br> <br> <li>這裡放下拉內容物3</li> </div> <br> <br> <li>這裡下拉4<br> </li> <br> 🎜> <div>這裡放下拉5 </div> <br> <br> <br> >