xzknet 发表于 2013-1-29 07:48:11

用DHTML做的一个菜单特效

<div style="padding-right: 5.4pt; padding-left: 5.4pt; background: #e6e6e6; padding-bottom: 4px; width: 95%; padding-top: 4px;">http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<!--样式表部分-->
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif<style type=text/css>...
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif.menu td{...}{font-size:12px;color:white;font-weight:bold;background:#336699;border:1px solid #336699;filter:blendtrans(duration=0.5);cursor:hand;text-align:center}
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif</style>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<!--脚本定义部分-->
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif<script language=javascript type=text/javascript>...
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.giffunction showFilter(obj)...{
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gifvar tds=obj.getElementsByTagName("td");
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.giffor(var i=0;i<tds.length;i++)...{
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gifwith(tds)...{
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif  onmouseover=function()...{
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif  with(this)...{
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  filters[0].apply();
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  style.color='black';
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  style.border='1px solid white';
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  style.background='#66CCFF';
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  filters[0].play();
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif  }
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif  }
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif  onmouseout=function()...{
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif  with(this)...{
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  filters[0].apply();
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  style.color='white';
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  style.border='1px solid #336699';
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  style.background='#336699';
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif  filters[0].play();
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif  }
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif  }
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif}
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif}
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif}
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif</script>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<!--BODY部分-->
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<table cellspacing=4 cellpadding=1 bgColor=#336699 border=0 class=menu width=100 id=xmenu>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<tr><td>0128论坛</td></tr>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<tr><td>例子二</td></tr>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<tr><td>例子三</td></tr>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<tr><td>例子四</td></tr>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<tr><td>例子五</td></tr>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif<tr><td>例子六</td></tr>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif</table>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif<script>...showFilter(xmenu); //里面就的xmenu就是表格的ID号此函数可到处调用</script>
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif
页: [1]
查看完整版本: 用DHTML做的一个菜单特效