点击大标题显示与隐藏小标题

点击大标题显示与隐藏小标题
<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>


用法:

<tr>
            <td height="26" background="../image/menu.gif" id="menuTitle1" onClick="showsubmenu(1)" style="cursor:hand;">&nbsp;&nbsp;&nbsp;
            <font color="#FF9900">■&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FFFFFF"><strong>知识库分类</strong></font>
            </td>
          </tr>
          <tr>
<td style="display:none" id='submenu1'>
     <table cellspacing="0" align="center" width="100%">
                <tr>
                  <td class="nav">· <a href="<%=request.getContextPath()%>/knowledge/knowledgeCategoryList.htm?order=list" target="mainFrame">编辑知识库分类</a></td>
                </tr>
                <tr>
                  <td class="nav">· <a href="<%=request.getContextPath()%>/knowledge/knowledgeCategoryList.htm?order=edit" target="mainFrame">新增知识库分类</a></td>
                </tr>
              </table>

你可能感兴趣的:(点击大标题显示与隐藏小标题)