简易JS版多级菜单

1.  <sriptlanguage="javascript">
                function xian(y) {
                    if (y.style.display == "block")
                    { y.style.display = "none"; }
                    else
                    { y.style.display = "block"; }
                }
              </script>

 

2.

<li><a href="javascript:xian(zhong15)" class="lj">一级</a>

                                    <ul id="zhong15" style="display:none;" >

                                      <li><a href="products.asp">二级</a>

……

</li>                                    

              </ul>    

                              

</li>

posted @ 2012-09-27 16:06  Xyang  阅读(166)  评论(0编辑  收藏  举报
hi