悬赏分:5 浏览:708 次

|
应该是别人开发的一个东西吧,不过没有用过,不知道这个东西的表现状态是什么样的 js控制一个一个表格显示 DIV的DISPLAY就可以实现 JS代码: function ToggleNode(nodeObject, imgObject,imgout,imgover){ if (nodeObject.style.display == '' || nodeObject.style.display == 'inline') { nodeObject.style.display = 'none'; imgObject.src=imgover; } else { nodeObject.style.display = 'inline'; imgObject.src=imgout; } } 页面代码: <table cellspacing="0" cellpadding="0" width="180" border="0"> <tr style="CURSOR: hand" onclick="ToggleNode(menu02,arrow02,'images/arrow01top.gif','images/arrow01bottom.gif')"> <td> <table style="COLOR: #215dc6;height:20" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> <td align="left"><b> 综合查询</b></td> <td align="right"></td> </tr> </table> </td> </tr> <tr id="menu02"> <td> </td> </tr> </table> <br/> <!--左侧菜单3--> <table cellspacing="0" cellpadding="0" width="180" border="0"> <tr style="CURSOR: hand" onclick="ToggleNode(menu04,arrow04,'images/arrow01top.gif','images/arrow01bottom.gif')"> <td > <table cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> <td align="left"><b> 统计汇总</b></td> <td align="right"></td> </tr> </table> </td> < http://bbs.blueidea.com/thread-2515616-1-1.html BI论坛上有很好的源程序,你可以去自己看看。很不错的。 来这里下载吧 http://www.msup.com.cn/document/menu.rar 网上找js特效 <html> <head> <meta http-equiv="Content-Type" content="text ml; charset=gb2312"> <title></title> <style type="text/css"> .titleStyle{ background-color:#008800;color:#ffffff;border-top:1px solid #FFFFFF;font-size:9pt;cursor:hand; } .contentStyle{ background-color:#eeffee;color:blue;font-size:9pt; } a{ color:blue; } body{ font-size:9pt; } </style> </head> <body> <script language="JavaScript"> <!-- var layerTop=20; //菜单顶边距 var layerLeft=30; //菜单左边距 var layerWidth=140; //菜单总宽 var titleHeight=20; //标题栏高度 var contentHeight=200; //内容区高度 var stepNo=10; //移动步数,数值越大移动越慢 var itemNo=0;runtimes=0; document.write('<span id=itemsLayer style="position:absolute;overflow:hidden;border:1px solid #008800;left:'+layerLeft+';top:'+layerTop+';width:'+layerWidth+';">'); function addItem(itemTitle,itemContent){ itemHTML='<div id=item'+itemNo+' itemIndex='+itemNo+' style="position:relative;left:0;top:'+(-contentHeight*itemNo)+';width:'+layerWidth+';"><table width=100% cellspacing="0" cellpadding="0">'+ '<tr><td height='+titleHeight+' onclick=changeItem('+itemNo+') class="titleStyle" align=center>'+itemTitle+'</td></tr>'+ '<tr><td height='+contentHeight+' class="contentStyle">'+itemContent+'</td></tr></table></div>'; document.write(itemHTML); itemNo++; } 不想写JS,建议使用AjaxToolkit中的Accordion来实现 参考实例: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Accordion/Accordion.aspx |
|
9个月前 oec2003 : //添加菜单标题和内容,可任意多项,注意格式: addItem('欢迎','<BR> 欢迎光临设计在线!'); addItem('网页陶吧','<center><a href="#">网页工具</a> <BR><BR><a href="#">技术平台</a> <BR><BR><a href="#">设计理念</a> <BR><BR><a href="#">更多</a></center>'); addItem('美工教室','<center><a href="#">平面设计 </a> <BR><BR><a href="#">三维空间</a> <BR><BR><a href="#">设计基础</a> <BR><BR><a href="#">更多..</a></center>'); addItem('Flash','<center><a href="#">基础教程</a> <BR><BR><a href="#">技巧运用</a> <BR><BR><a href="#">实例剖析</a> <BR><BR><a href="#">更多..</a></center>'); addItem('多媒体','<center><a href="#">DIRECTOR</a> <BR><BR><a href="#">Authorware</a> <BR><BR><a href="#">更多..</a></center>'); addItem('精品赏析','<center><a href="#">设计精品</a></center>'); document.write('</span>') document.all.itemsLayer.style.height=itemNo*titleHeight+contentHeight; toItemIndex=itemNo-1;onItemIndex=itemNo-1; function changeItem(clickItemIndex){ toItemIndex=clickItemIndex; if(toItemIndex-onItemIndex>0) moveUp(); else moveDown(); runtimes++; if(runtimes>=stepNo){ onItemIndex=toItemIndex; runtimes=0;} else setTimeout("changeItem(toItemIndex)",10); } function moveUp(){ for(i=onItemIndex+1;i<=toItemIndex;i++) eval('document.all.item'+i+'.style.top=parseInt(document.all.item'+i+'.style.top)-contentHeight/stepNo;'); } function moveDown(){ for(i=onItemIndex;i>toItemIndex;i--) eval('document.all.item'+i+'.style.top=parseIn |
|
9个月前 oec2003 : function moveDown(){ for(i=onItemIndex;i>toItemIndex;i--) eval('document.all.item'+i+'.style.top=parseInt(document.all.item'+i+'.style.top)+contentHeight/stepNo;'); } changeItem(0); //--> </script> </body> <html> |