请问实现像CSDN论坛的树型菜单的效果????????????????????????? 可以用E-MAIL发给我 [email protected] 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 临时写了一个,你照着改吧!图片很简单,你可以自己找:======================================================<html><title>下拉菜单</title><head><script lanuage="JavaScript"> function changemenu(tablemenu,img) { if (event.button==1) { if (tablemenu.style.display=="none") { tablemenu.style.display=""; img.src="2.bmp"; } else { tablemenu.style.display="none"; img.src="1.bmp"; } }} function message(){ alert('aaaaaaaaa');}function changecolor(fontindex) { fontindex.color="red";}function restorecolor(fontindex) { fontindex.color="blue";} </script> </head><body><form><h3>这是一个树型菜单的例子:</h3><hr><table id="table1" cellSpacing="0" cellPadding="0" width="200" border="0"> <tr valign=top> <td width=10> <img id=img1 onmouseup="javascript:changemenu(menu1,img1);" src=.\1.bmp align=bottom></img> </td> <td style="cursor:hand" valign=top align=left> <font id=font1 onmousemove="javascript:changecolor(font1)" onmouseout="restorecolor(font1)" color=blue><label id=label1 onmouseup="javascript:changemenu(menu1,img1);"> 著名网站</label><font> </td> <tr> <tr> <td></td> <td> <table id="menu1" cellSpacing="0" cellPadding="0" width=100% border=0 style="display=none;"> <tr id=tr1 width=80 language="javascript" border=1 style="cursor:hand"> <td width=25><img src=3.bmp></td> <td><a href="http:\\www.sina.com.cn" target=_blank>新浪</a></td> </tr> <tr border=1 style="cursor:hand"> <td><img src=3.bmp></td> <td><a href="http:\\www.yahoo.com.cn" target=_blank>雅虎</a></td> </tr> <tr border=1 style="cursor:hand"> <td><img src=3.bmp></td> <td><a href="http:\\www.263.net" target=_blank>263</a></td> </tr> <tr border=1 style="cursor:hand"> <td><img src=4.bmp></td> <td><a href="http:\\www.sohu.com.cn" target=_blank>搜狐</a></td> </tr> </table> </td> </tr> <tr> <td width=10> <img id=img2 src=.\1.bmp onmouseup="javascript:changemenu(menu2,img2);" align=bottom></img> </td> <td style="cursor:hand" valign=top align=left> <font id=font2 onmouseup="javascript:changemenu(menu2,img2);" onmousemove="javascript:changecolor(font2)" onmouseout="restorecolor(font2)" color=blue> bbbbb<font> </td> <tr> <tr> <td></td> <td> <table id="menu2" cellSpacing="0" cellPadding="0" width=100% "border=0" style="display=none;color=blue"> <tr id=tr1 width=80 language="javascript" border=1 style="cursor:hand"> <td width=25><img src=3.bmp></td> <td>5</td> </tr> <tr border=1 style="cursor:hand"> <td><img src=3.bmp></td> <td>6</td> </tr> <tr border=1 style="cursor:hand"> <td><img src=3.bmp></td> <td>7</td> </tr> <tr border=1 style="cursor:hand"> <td><img src=4.bmp></td> <td>8</td> </tr> </table> </td> </tr></table></form></body></html> http://fason.nease.net/zhuanti/tree/XML.zip CSDN目录是动态生成的啊! 树形菜单: http://expert.csdn.net/Expert/topic/2680/2680197.xml?temp=.6053278 http://expert.csdn.net/Expert/topic/2680/2680203.xml?temp=.7946588 Jquery 循环赋值问题 (填空)。 怎样在这个JavaScript写的ASP无组件上传类里添加jpeg和png文件? 请问Microsoft VM 对javascript的是否有影响 100 求助 一个关于javascript的奇怪的问题 下拉框输入选中的问题? 怎样让alert的提示信息换行?怎样将alert的提示框做成自定义的有色彩的提示框 关于select列表框的提示 想不通为什么输出不了日期??? js ajax调用API问题 哪位大哥帮忙一下! 请高手指点下面的javascript是什么意思?
======================================================
<html>
<title>下拉菜单</title>
<head>
<script lanuage="JavaScript">
function changemenu(tablemenu,img)
{
if (event.button==1)
{
if (tablemenu.style.display=="none")
{
tablemenu.style.display="";
img.src="2.bmp";
}
else
{
tablemenu.style.display="none";
img.src="1.bmp";
}
}
}
function message()
{
alert('aaaaaaaaa');
}
function changecolor(fontindex)
{
fontindex.color="red";
}
function restorecolor(fontindex)
{
fontindex.color="blue";
}
</script>
</head>
<body>
<form>
<h3>这是一个树型菜单的例子:</h3>
<hr>
<table id="table1" cellSpacing="0" cellPadding="0" width="200" border="0">
<tr valign=top>
<td width=10>
<img id=img1 onmouseup="javascript:changemenu(menu1,img1);" src=.\1.bmp align=bottom></img>
</td>
<td style="cursor:hand" valign=top align=left>
<font id=font1 onmousemove="javascript:changecolor(font1)" onmouseout="restorecolor(font1)" color=blue><label id=label1 onmouseup="javascript:changemenu(menu1,img1);"> 著名网站</label><font>
</td>
<tr>
<tr>
<td></td>
<td>
<table id="menu1" cellSpacing="0" cellPadding="0" width=100% border=0 style="display=none;">
<tr id=tr1 width=80 language="javascript" border=1 style="cursor:hand">
<td width=25><img src=3.bmp></td>
<td><a href="http:\\www.sina.com.cn" target=_blank>新浪</a></td>
</tr>
<tr border=1 style="cursor:hand">
<td><img src=3.bmp></td>
<td><a href="http:\\www.yahoo.com.cn" target=_blank>雅虎</a></td>
</tr>
<tr border=1 style="cursor:hand">
<td><img src=3.bmp></td>
<td><a href="http:\\www.263.net" target=_blank>263</a></td>
</tr>
<tr border=1 style="cursor:hand">
<td><img src=4.bmp></td>
<td><a href="http:\\www.sohu.com.cn" target=_blank>搜狐</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width=10>
<img id=img2 src=.\1.bmp onmouseup="javascript:changemenu(menu2,img2);" align=bottom></img>
</td>
<td style="cursor:hand" valign=top align=left>
<font id=font2 onmouseup="javascript:changemenu(menu2,img2);" onmousemove="javascript:changecolor(font2)" onmouseout="restorecolor(font2)" color=blue> bbbbb<font>
</td>
<tr>
<tr>
<td></td>
<td>
<table id="menu2" cellSpacing="0" cellPadding="0" width=100% "border=0" style="display=none;color=blue">
<tr id=tr1 width=80 language="javascript" border=1 style="cursor:hand">
<td width=25><img src=3.bmp></td>
<td>5</td>
</tr>
<tr border=1 style="cursor:hand">
<td><img src=3.bmp></td>
<td>6</td>
</tr>
<tr border=1 style="cursor:hand">
<td><img src=3.bmp></td>
<td>7</td>
</tr>
<tr border=1 style="cursor:hand">
<td><img src=4.bmp></td>
<td>8</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
http://expert.csdn.net/Expert/topic/2680/2680197.xml?temp=.6053278
http://expert.csdn.net/Expert/topic/2680/2680203.xml?temp=.7946588