Jquery实现下拉列表以前写过一个 不是现在这个方法写的 一下想不起来了 不过这样也凑合 <br> <script type=text/javascript><br> $(function(){<br> var f = 0<br> $(#show).click(function(){<br> $(#menu).slideDown(function(){<br> f=1<br> })<br> })<br> $(*).click(function(){<br> if($(#menu).is(:visible)&&f==1){<br> $(#menu).slideUp()<br> f=0<br> }<br> })<br> })<br> <br> </head><br> <body><br> <button id=show>show</button><br> <ul id=menu style=display:noneborder: 1px solidlist-style: nonewidth: 100px><br> <li>1</li><br> <li>2</li><br> <li>3</li><br> <li>4</li><br> </ul><br> </body><br></html></p>