新樹狀連結
將下列程式碼複製至<head>程式碼</head>區內。
<div align="left"> <DIV onmousedown="fmenu1()" style="cursor:hand;"> <img src="demo.gif" width="20" height="20">網頁選單之一</DIV> <TABLE id=menu1 style="display:none" border="0" width="100"> <TR> <TD> <a href="demo.htm"><img src="count.gif" border="0" width="16" height="16">次選單一</a><BR> <a href="demo.htm"><img src="count.gif" border="0" width="16" height="16">次選單二</a><BR> <a href="demo.htm"><img src="count.gif" border="0" width="16" height="16">次選單三</a><BR> </TD> </TR> </TABLE> <DIV onmousedown="fmenu2()" style="cursor:hand;"> <img src="demo.gif" width="20" height="20">網頁選單之二</DIV> <TABLE id=menu2 style="display:none" border="0" width="100"> <TR> <TD> <a href="demo.htm"><img src="count.gif" border="0" width="16" height="16">次選單一</a><BR> <a href="demo.htm"><img src="count.gif" border="0" width="16" height="16">次選單二</a><BR> <a href="demo.htm"><img src="count.gif" border="0" width="16" height="16">次選單三</a><BR> </TD> </TR> </TABLE> <SCRIPT language="JavaScript"> function fmenu1(){ if( menu1.style.display == "none") menu1.style.display = "block"; else menu1.style.display = "none";} function fmenu2(){ if( menu2.style.display == "none") menu2.style.display = "block"; else menu2.style.display = "none";} </SCRIPT> |