先看效果: 代码: 复制代码 代码如下: Good Test <BR>function showSubMenu(SubMenu) { <BR>document.getElementById(SubMenu).style.display = "inline"; <BR>} <BR>function HideSubMenu(SubMenu) { <BR>document.getElementById(SubMenu).style.display = "none"; <BR>} <BR> <BR>.menu{ <BR>margin:1px 1px 1px 1px; <BR>padding:3px 5px 3px 5px; <BR>background-color:#8080C0; <BR>color:white; <BR>} <BR>.submenu { <BR>margin:1px 1px 1px 1px; <BR>padding:3px 5px 3px 5px; <BR>background-color:#8080C0; <BR>color:white; <BR>} <BR> Menu1 SubMenu1 SubMenu2 SubMenu3 SubMenu4 Menu2 SubMenu1 SubMenu2 SubMenu3 SubMenu4 Menu3 SubMenu1 SubMenu2 SubMenu3 SubMenu4 Menu4 SubMenu1 SubMenu2 SubMenu3 SubMenu4