41、二级树型菜单效果。
程序代码:
<STYLE type=text/css> TD { FONT-SIZE: 12px; FONT-FAMILY: "宋体" } </STYLE> <script language="javascript"> <!-- function treebr0(i){ obj=eval('d'+i) objimage=eval('image'+i) if (obj.style.display == "none"){ obj.style.display='block' objimage.src="dotCM.gif"} else{ obj.style.display='none' objimage.src="dotOM.gif"} } //--> </script> <table cellSpacing=0 cellPadding=0 width=200 border=0 STYLE='cursor:hand' onclick="javascript:treebr0(1);"> <tr> <td width=4></td><td width=16 height=16><img src="dotOM.gif" id=image1></td><td align=left><b>我的办公室</b></td> </tr> </table> <table cellSpacing=0 cellPadding=0 width=200 border=0 id=d1 style="display='none'"> <tr> <td width=4></td><td width=16><img src="dotMargin.gif"></td><td width=16><img src="dotM.gif"></td><td>我的信息</td> </tr> <tr> <td width=4></td><td><img src="dotMargin.gif"></td><td><img src="dotB.gif"></td><td>我的邮件</td> </tr> </table> <table cellSpacing=0 cellPadding=0 width=200 border=0> <tr> <td width=4></td><td><img src="dotMargin.gif"></td> </tr> </table> <table cellSpacing=0 cellPadding=0 width=200 border=0 STYLE='cursor:hand' onclick="javascript:treebr0(2);"> <tr> <td width=4></td><td width=16 height=16><img src="dotOM.gif" id=image2></td><td align=left><b>共享资源</b></td> </tr> </table> <table cellSpacing=0 cellPadding=0 width=200 border=0 id=d2 style="display='none'"> <tr> <td width=4></td><td width=16><img src="dotMargin.gif"></td><td width=16><img src="dotM.gif"></td><td>音乐欣赏</td> </tr> <tr> <td width=4></td><td><img src="dotMargin.gif"></td><td><img src="dotB.gif"></td><td>航空信息</td> </tr> </table> <table cellSpacing=0 cellPadding=0 width=200 border=0> <tr> <td width=4></td><td><img src="dotMargin.gif"></td> </tr> </table> <table cellSpacing=0 cellPadding=0 width=200 border=0 STYLE='cursor:hand' onclick="javascript:treebr0(3);"> <tr> <td width=4></td><td width=16 height=16><img src="dotOM.gif" id=image3></td><td align=left><b>办公助理</b></td> </tr> </table> <table cellSpacing=0 cellPadding=0 width=200 border=0 id=d3 style="display='none'"> <tr> <td width=4></td><td width=16><img src="dotMargin.gif"></td><td width=16><img src="dotM.gif"></td><td>法律法规</td> </tr> <tr> <td width=4></td><td><img src="dotMargin.gif"></td><td><img src="dotB.gif"></td><td>邮政编码</td> </tr> </table>
思考赐予新生,时间在于定义