Código:
<html> <head> <title> menu </title> <script type="text/javascript"> <!-- // for the subcategories function showhidelayer(layername){ if(document.getElementById(layername).style.display=='none'){ document.getElementById(layername).style.display='block'; } else{ document.getElementById(layername).style.display='none'; } } //--> </script> </head> <body> <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> <div class="subNav"> <h3><a href="#" onclick="showhidelayer('subCat1');">Menu 1</a></h3> <ul id="subCat1"> <li><a href="#">Submenu 1-1</a></li> <li><a href="#">Submenu 1-2</a></li> <li><a href="#">Submenu 1-3</a></li> </ul> <h3><a href="#" onclick="showhidelayer('subCat2');">Menu2</a></h3> <ul id="subCat2" style="display:none;"> <li><a href="#">Submenu 2-1</a></li> <li><a href="#">Submenu 2-2</a></li> </ul> </div> </body> </html>