首页
微信
安卓
接口
移动
前端
专题
文档库
工具
网址
§
ITPOW
>>
文档
>>
JavaScript
>>
菜单导航
替换Select的下拉菜单
作者: 来源: 日期:2004-9-30
<style> #innermenu a{ text-decoration:none; } #innermenu a:hover{ background-color:#FFFF95; } </style> <script language="JavaScript1.2"> var ie5=(document.getElementById&&navigator.appName.indexOf("Internet Explorer")!=-1&&navigator.userAgent.indexOf("Opera")==-1) if (ie5){ document.write('<span style="position:relative;width:150px;height:20px;border:1px solid black;font:bold 12px Verdana;padding:2px" onClick="showhide(1);event.cancelBubble=1" ><span style="cursor:hand;width:100%">网络隧道目录▼</span>') document.write('<div id="innermenu" style="position:absolute;left:2;top:16;width:150px;height:150px;border:1px solid black;background-color:white;overflow-y:scroll;visibility:hidden;">') } function gl(linkname,dest){ document.write('<b><a href="'+dest+'">'+linkname+'</a></b><br>') } function showhide(state){ var cacheobj=document.getElementById("innermenu").style if (state==0) cacheobj.visibility="hidden" else cacheobj.visibility=cacheobj.visibility=="hidden"? "visible" : "hidden" } if (ie5){ gl("网页特效","http://www.nettun.com/cjava/"); gl("网络技术","http://www.nettun.com/tec/"); gl("笑话空间","http://www.nettun.com/joke/"); gl("动漫频道","http://www.nettun.com/picture/"); gl("下载专区","http://www.nettun.com/download/"); gl("查询系统","http://www.nettun.com/lookup/"); gl("在线书签","http://www.nettun.com/favorites/"); gl("在线游戏","http://www.nettun.com/games/"); gl("影视频道","http://www.nettun.com/film/"); } if (ie5){ document.onclick=function(){showhide(0)} document.write('</div></span>') } </script>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
相关文章
创建于2005年
渝ICP备05010272号-1
电邮:
cftea@126.com
即将跳转...