分类分类
更新时间:2015-08-27 16:18作者:yezheng
本文实例讲述了js实现的早期滑动门菜单效果代码。分享给大家供大家参考。具体如下:
这里介绍的是传说中的早期滑动门菜单Demo代码,测试时请把鼠标放到左侧相应的导航栏目上,放在左侧菜单上的时候,你就发现玄机了,右侧的内容会跟着变化,JS与HTML结合实现的,比较传统的导航效果。
运行效果截图如下:

具体代码如下:
<HTML>
<HEAD>
<TITLE>文字导航效果--滑动门</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</HEAD>
<BODY bgColor=#fef4d9>
<CENTER>
<TABLE borderColor=#993399 border=5 borderlight="green">
<TBODY>
<TR>
<TD align=middle>
<SCRIPT language=JavaScript>
<!-- Begin
var linktext=new Array()
linktext[0]='<table border="0" width="210" height="185" bgcolor="#EFEFEF" cellpadding="8" cellspacing="0"><tr><td valign="top">国内最常用的校友录站点</td></tr></table>'
linktext[1]='<table border="0" width="210" height="185" bgcolor="#D1FD80" cellpadding="8" cellspacing="0"><tr><td valign="top">国内最大的游戏网站-第九城市</td></tr></table>'
linktext[2]='<table border="0" width="210" height="185" bgcolor="#FDB9FD" cellpadding="8" cellspacing="0"><tr><td valign="top">国内最大的新闻发布类站点-新浪网</td></tr></table>'
linktext[3]='<table border="0" width="210" height="185" bgcolor="#FFFF5E" cellpadding="8" cellspacing="0"><tr><td valign="top">国内最大的综合性娱乐站点--网易</td></tr></table>'
linktext[4]='<table border="0" width="210" height="185" bgcolor="#C2D7FC" cellpadding="8" cellspacing="0"><tr><td valign="top">最大的搜索引擎站点...百度</td></tr></table>'
var ns6=document.getElementById&&!document.all
var ie=document.all
function show_text(thetext, whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML=linktext[thetext]
else if (ns6) document.getElementById(whichdiv).innerHTML=linktext[thetext] }
function reset(whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML='<table border="0" width="210" height="185" bgcolor="#F88530" cellpadding="0" cellspacing="8"><tr><td valign="top"><font face="arial" size="4"><b>请把鼠标放到左侧相应的导航栏目上<p>有所变化</b></font></td></tr></table>'
else if (ns6) document.getElementById(whichdiv).innerHTML='<table border="0" width="210" height="185" bgcolor="#F88530" cellpadding="8" cellspacing="0"><tr><td valign="top"><font face="arial" size="4"><b>请把鼠标放到左侧相应的导航栏目上<p>看到变化效果了吗?</b></font></td></tr></table>'}
// End -->
</SCRIPT>
<TABLE cellSpacing=0 cellPadding=3 width=370 align=center bgColor=black
border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=370 background=""
border=0><TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=8 width=160 bgColor=#f88530
border=0>
<TBODY>
<TR>
<TD onMouseOver="bgColor='#EFEFEF'; show_text(0,'div1')"
style="CURSOR: hand"
onclick="window.location='http://www.chinaren.com'"
onmouseout="bgColor='#F88530'; reset('div1')">中国人</TD></TR>
<TR>
<TD onMouseOver="bgColor='#D1FD80'; show_text(1,'div1')"
style="CURSOR: hand"
onclick="window.location='http://www.the9.com'"
onmouseout="bgColor='#F88530'; reset('div1')">第九城市</TD></TR>
<TR>
<TD onMouseOver="bgColor='#FDB9FD'; show_text(2,'div1')"
style="CURSOR: hand"
onclick="window.location='http://www.sina.com.cn'"
onmouseout="bgColor='#F88530'; reset('div1')">新浪网</TD></TR>
<TR>
<TD onMouseOver="bgColor='#FFFF5E'; show_text(3,'div1')"
style="CURSOR: hand"
onclick="window.location='http://www.163.com'"
onmouseout="bgColor='#F88530'; reset('div1')">网易</TD></TR>
<TR>
<TD onMouseOver="bgColor='#C2D7FC'; show_text(4,'div1')"
style="CURSOR: hand"
onclick="window.location='http://www.baidu.com'"
onmouseout="bgColor='#F88530'; reset('div1')">百度一下</TD></TR></TBODY></TABLE></TD>
<TD><SPAN id=div1>
<TABLE height=185 cellSpacing=0 cellPadding=8 width=210
bgColor=#f88530 border=0>
<TBODY>
<TR>
<TD vAlign=top><FONT face=arial
size=4><B>请把鼠标放到左侧相应的导航栏目上
<P>有所变化</P></B></FONT></TD></TR></TBODY></TABLE></SPAN></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</CENTER>
</BODY>
</HTML>
希望本文所述对大家的javascript程序设计有所帮助。
相关
纸片马里奥(Paperboat)角色扮演107.85 MBv1.0.32026-11-29
下载cyime输入法实用工具74.58 MBv1.15.1072026-11-29
下载武道仙宗官方版角色扮演456.19 Mv1.0.02026-11-29
下载mmrl模块app实用工具7.15 Mv342962026-11-29
下载零希沃特手机版角色扮演511.54 Mv1.4.22026-11-29
下载Bannerlator手游辅助574.84 MBv3.2.12026-11-29
下载巅峰激战(魔幻格斗游戏)动作射击797.1 MBv1.0.92026-11-29
下载我的火车防御策略游戏181.87 Mv1.1.52026-11-29
下载三国棋逢对手角色扮演1.7Gv1.2.5.0002.1125.11432026-11-29
下载图纸没问题手机版休闲益智78.41 Mv1.0.182026-11-29
下载蛊界永生角色扮演407.01 Mv0.4.162026-11-28
下载百炼仙途角色扮演528.9 Mv10002026-11-28
下载










