您好,欢迎来到模板无忧!
登录
注册
闂佽 鍋撻柟顖滃椤ワ拷
闂佺懓鍚嬬划搴ㄥ磼閿燂拷
闂侀潻闄勫妯好归敓锟�
闁汇埄鍨奸崰鏍ㄦ叏閿燂拷
模板无忧
网页特效
每日更新
|
TOP排行榜
|
Tag标签
|
充值
无忧首页
网页模板
程序模板
建站教程
视频教程
网页特效
图标素材
字体下载
站长工具
站长问答
关闭顶部
展开顶部
网页特效
菜单导航
图片特效
文本链接
层和布局
页面背景
表单按钮
日期时间
计算转换
键盘鼠标
浏览器
游戏娱乐
综合其它
常用代码
jQuery特效
Prototype
Ajax/JavaScript
ExtJS
CSS特效
在线编辑器
Mootools
HTML
JS广告代码合集
站长工具
站长常用软件
网站综合查询
Alexa排名查询
Google PR查询
域名Whois查询
网站收录查询
友情链接查询
CSS2中文手册
CSS精简优化工具
AI鐏忓繗浠� 閼宠棄鍟撴导姘辨暰
閸╃喎鎮�
閹恒劏宕�
展开边栏
关闭边栏
网页特效代码
模板无忧
>
网页特效
>
菜单导航特效代码
>
收藏
分享
查看评论
菜单导航
演示
带图形声音的右键菜单_菜单导航特效
查看演示效果
特效Tag:
图形
声音
添加
缂佸洦鈪礑edeCMS鐟欏棝顣堕弫娆戔柤
娑旀壆鈹栭梻锟� 缁夌喐婀囬崝鈥虫珤 闁缍夌涵鏇氱鞍閼辨棑绱�
閺冪姴鍜栫粩娆撴毐瀹搞儱鍙�,閻ф儳瀹抽弶鍐櫢娑撯偓闁款喖鍙忛弻锟�!
带图形声音的右键菜单,您可以先修改部分代码再运行.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0056)http://netroom.hbu.edu.cn/personal/stroll/mouse-menu.htm --> <HTML><HEAD><TITLE>mouse-menu-模板无忧www.mb5u.com</TITLE> <META mrc="text/html; charset=gb2312" http-equiv=Content-Type> <META mrc="MSHTML 5.00.3502.4856" name=GENERATOR> <META mrc=FrontPage.Editor.Document name=ProgId> <STYLE>.menutable { BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #307ce8 1px solid; BORDER-LEFT: #307ce8 5px solid; BORDER-RIGHT: #307ce8 1px solid; BORDER-TOP: #94bcf3 1px solid; FONT-SIZE: 12px; POSITION: absolute; Z-INDEX: 100 } .menutrin { BACKGROUND-COLOR: #1a71e6; COLOR: #ffffff; CURSOR: hand } .menutrout { COLOR: #000000; CURSOR: hand } .menutd0 { HEIGHT: 25px; TEXT-ALIGN: center; WIDTH: 28px; 改变这个修改菜单高度--->: } .menutd1 { FONT-FAMILY: Webdings; TEXT-ALIGN: right; WIDTH: 46px } .linktd1 { WIDTH: 46px } .menutd2 { WIDTH: 4px } .menuhr { BORDER-BOTTOM: #307ce8 1px inset; BORDER-LEFT: #307ce8 1px inset; BORDER-RIGHT: #307ce8 1px inset; BORDER-TOP: #307ce8 1px inset } </STYLE> <BGSOUND id=theBS loop=0 src=""></HEAD> <BODY bgColor=#eaf5fd style="FONT-SIZE: 10pt"> <SCRIPT><!---- /*----------------------------------------------------------- 鼠标右键菜单 1.0 Designed By Stroll e-mail: csy-163@163.com --------------------------------------------------------------*/ //--------------- 有关数据 -----------------// var IconList = new Array(); // icon图片 集合, 下标从 1 开始 IconList[1] = new Image(); IconList[1].src = "http://p1.mb5u.com/texiao/11/2010052300480019.gif"; IconList[2] = new Image(); IconList[2].src = "http://p1.mb5u.com/texiao/11/2010052300480019.gif"; IconList[3] = new Image(); IconList[3].src = "http://p1.mb5u.com/texiao/11/2010052300480019.gif"; IconList[4] = new Image(); IconList[4].src = "http://p1.mb5u.com/texiao/11/2010052300480019.gif"; //---------------- 检测变量 菜单的显示隐藏就靠它了!!! ------------------// var JustMenuID = ""; var SubMenuList = new Array(); var NowSubMenu = ""; var mouseCanSound = true; //--------------------------- 声音开关 ------ 声音开关 ------------------// var menuSpeed = 50; //---------- 菜单显示速度 ------------// var alphaStep = 30; //---------- Alpaha 变化 度 -----------// //------------- 构建 主菜单 对象 -------------// function MouseMenu(objName) { this.id = "Menu_"+objName; this.obj = objName; this.length = 0; this.addMenu = addMenu; this.addLink = addLink; this.addHR = addHR; JustMenuID = this.id; document.body.insertAdjacentHTML('beforeEnd','<table id="'+this.id+'" border="0" cellspacing="0" cellpadding="0" style="top: 0; left: 0; visibility: hidden; filter:Alpha(Opacity=0);" class="menutable" onmousedown=event.cancelBubble=true; onmouseup=event.cancelBubble=true></table>'); } //----------- 构建 子菜单 对象 -------------// function SubMenu(objName,objID) { this.obj = objName; this.id = objID; this.addMenu = addMenu; this.addLink = addLink; this.addHR = addHR; this.length = 0; } //-------------- 生成 菜单 makeMenu 方法 -----------// function makeMenu(subID,oldID,word,icon,url,target,thetitle) { var thelink = ''; if(icon&&icon!="") { icon = '<img border="0" src="http://p1.mb5u.com/texiao/11/2010052300480018.src+'">'; } else { icon = ''; } if(!thetitle||thetitle=="") { thetitle = ''; } if(url&&url!="") { thelink += '<a href="'+url+'" '; if(target&&target!="") { thelink += ' '; thelink += 'target="'+target+'" ' } thelink += '></a>'; } var Oobj = document.getElementById(oldID); /*--------------------------------------------- 菜单html样式 <tr class="menutrout" id="trMenu_one_0" title="I am title"> <td class="menutd0"><img src="http://p1.mb5u.com/texiao/11/2010052300480019.gif" border="0" width="16" height="16"></td> <td><a href="javascript:alert('I am menu');" target="_self"></a><nobr>菜单一</nobr></td> <td class="menutd1">4</td> <td class="menutd2"> </td> </tr> --------------------------------------------------*/ Oobj.insertRow(); with(Oobj.rows(Oobj.rows.length-1)) { id = "tr"+subID; className = "menutrout"; title = thetitle; } eventObj = "tr"+subID; eval(eventObj+'.attachEvent("onmouseover",MtrOver('+eventObj+'))'); eval(eventObj+'.attachEvent("onclick",MtrClick('+eventObj+'))'); var trObj = eval(eventObj); for(i=0;i<4;i++) { trObj.insertCell(); } with(Oobj.rows(Oobj.rows.length-1)) { cells(0).className = "menutd0"; cells(0).innerHTML = icon; cells(1).innerHTML = thelink+'<nobr class=indentWord>'+word+'</nobr>'; cells(1).calssName = "indentWord" cells(2).className = "menutd1"; cells(2).innerHTML = "4"; cells(3).className = "menutd2"; cells(3).innerText = " "; } document.body.insertAdjacentHTML('beforeEnd','<table id="'+subID+'" border="0" cellspacing="0" cellpadding="0" style="top: 0; left: 0; visibility: hidden; filter:Alpha(Opacity=0);" class="menutable" onmousedown=event.cancelBubble=true; onmouseup=event.cancelBubble=true></table>'); } //---------------- 生成连接 makeLink 方法 ------------// function makeLink(subID,oldID,word,icon,url,target,thetitle) { var thelink = ''; if(icon&&icon!="") { icon = '<img border="0" src="http://p1.mb5u.com/texiao/11/2010052300480018.src+'">'; } else { icon = ''; } if(!thetitle||thetitle=="") { thetitle = ''; } if(url&&url!="") { thelink += '<a href="'+url+'" '; if(target&&target!="") { thelink += ' '; thelink += 'target="'+target+'" ' } thelink += '></a>'; } var Oobj = document.getElementById(oldID); /*--------------------------------------------- 连接html样式 <tr class="menutrout" id="trMenu_one_0" title="I am title"> <td class="menutd0"><img src="http://p1.mb5u.com/texiao/11/2010052300480019.gif" border="0" width="16" height="16"></td> <td><a href="javascript:alert('I am link');" target="_self"></a><nobr>连接一</nobr></td> <td class="linktd1"></td> <td class="menutd2"> </td> </tr> --------------------------------------------------*/ Oobj.insertRow(); with(Oobj.rows(Oobj.rows.length-1)) { id = "tr"+subID; className = "menutrout"; title = thetitle; } eventObj = "tr"+subID; eval(eventObj+'.attachEvent("onmouseover",LtrOver('+eventObj+'))'); eval(eventObj+'.attachEvent("onmouseout",LtrOut('+eventObj+'))'); eval(eventObj+'.attachEvent("onclick",MtrClick('+eventObj+'))'); var trObj = eval(eventObj); for(i=0;i<4;i++) { trObj.insertCell(); } with(Oobj.rows(Oobj.rows.length-1)) { cells(0).className = "menutd0"; cells(0).innerHTML = icon; cells(1).innerHTML = thelink+'<nobr class=indentWord>'+word+'</nobr>'; cells(2).className = "linktd1"; cells(2).innerText = " "; cells(3).className = "menutd2"; cells(3).innerText = " "; } } //-------------- 菜单对象 addMenu 方法 ------------// function addMenu(word,icon,url,target,title) { var subID = this.id + "_" + this.length; var subObj = this.obj+"["+this.length+"]"; var oldID = this.id; eval(subObj+"= new SubMenu('"+subObj+"','"+subID+"')"); makeMenu(subID,oldID,word,icon,url,target,title); this.length++; } //------------- 菜单对象 addLink 方法 -------------// function addLink(word,icon,url,target,title) { var subID = this.id + "_" + this.length; var oldID = this.id; makeLink(subID,oldID,word,icon,url,target,title); this.length++; } //------------ 菜单对象 addHR 方法 -----------------// function addHR() { var oldID = this.id; var Oobj = document.getElementById(oldID); Oobj.insertRow(); /*------------------------------------------ <tr> <td colspan="4"> <hr class="menuhr" size="1" width="95%"> </td> </tr> --------------------------------------------*/ Oobj.rows(Oobj.rows.length-1).insertCell(); with(Oobj.rows(Oobj.rows.length-1)) { cells(0).colSpan= 4; cells(0).insertAdjacentHTML('beforeEnd','<hr class="menuhr" size="1" width="95%">'); } } //--------- MtrOver(obj)-------------------// function MtrOver(obj) { return sub_over; function sub_over() { var sonid = obj.id.substring(2,obj.id.length); var topobj = obj.parentElement.parentElement; NowSubMenu = topobj.id; if(obj.className=="menutrout") { mouseWave(); } HideMenu(1); SubMenuList[returnIndex(NowSubMenu)] = NowSubMenu; ShowTheMenu(sonid,MPreturn(sonid)) SubMenuList[returnIndex(obj.id)] = sonid; if(topobj.oldTR) { eval(topobj.oldTR+'.className = "menutrout"'); } obj.className = "menutrin"; topobj.oldTR = obj.id; } } //--------- LtrOver(obj)-------------------// function LtrOver(obj) { return sub_over; function sub_over() { var topobj = obj.parentElement.parentElement; NowSubMenu = topobj.id; HideMenu(1); SubMenuList[returnIndex(NowSubMenu)] = NowSubMenu; if(topobj.oldTR) { eval(topobj.oldTR+'.className = "menutrout"'); } obj.className = "menutrin"; topobj.oldTR = obj.id; } } //--------- LtrOut(obj)-------------------// function LtrOut(obj) { return sub_out; function sub_out() { var topobj = obj.parentElement.parentElement; obj.className = "menutrout"; topobj.oldTR = false; } } //----------MtrClick(obj)-----------------// function MtrClick(obj) { return sub_click; function sub_click() { if(obj.cells(1).all.tags("A").length>0) { obj.cells(1).all.tags("A")(0).click(); } } } //---------- returnIndex(str)--------------// function returnIndex(str) { return (str.split("_").length-3) } //---------ShowTheMenu(obj,num)-----------------// function ShowTheMenu(obj,num) { var topobj = eval(obj.substring(0,obj.length-2)); var trobj = eval("tr"+obj); var obj = eval(obj); if(num==0) { with(obj.style) { pixelLeft = topobj.style.pixelLeft +topobj.offsetWidth; pixelTop = topobj.style.pixelTop + trobj.offsetTop; } } if(num==1) { with(obj.style) { pixelLeft = topobj.style.pixelLeft + topobj.offsetWidth; pixelTop = topobj.style.pixelTop + trobj.offsetTop + trobj.offsetHeight - obj.offsetHeight; } } if(num==2) { with(obj.style) { pixelLeft = topobj.style.pixelLeft - obj.offsetWidth; pixelTop = topobj.style.pixelTop + trobj.offsetTop; } } if(num==3) { with(obj.style) { pixelLeft = topobj.style.pixelLeft - obj.offsetWidth; pixelTop = topobj.style.pixelTop + trobj.offsetTop + trobj.offsetHeight - obj.offsetHeight; } } obj.style.visibility = "visible"; if(obj.alphaing) { clearInterval(obj.alphaing); } obj.alphaing = setInterval("menu_alpha_up("+obj.id+","+alphaStep+")",menuSpeed); } //----------HideMenu(num)-------------------// /*---------------------- var SubMenuList = new Array(); var NowSubMenu = ""; ---------------------*/ function HideMenu(num) { var thenowMenu = ""; var obj = null; if(num==1) { thenowMenu = NowSubMenu } for(i=SubMenuList.length-1;i>=0;i--) { if(SubMenuList[i]&&SubMenuList[i]!=thenowMenu) { obj = eval(SubMenuList[i]); if(obj.alphaing) { clearInterval(obj.alphaing); } obj.alphaing = setInterval("menu_alpha_down("+obj.id+","+alphaStep+")",menuSpeed); obj.style.visibility = "hidden"; eval("tr"+SubMenuList[i]).className = "menutrout"; SubMenuList[i] = null; } else { if(SubMenuList[i]==thenowMenu) { return; } } } NowSubMenu = ""; } //-----------MainMenuPosition return()------------// function MMPreturn() { var obj = eval(JustMenuID); var x = event.clientX; var y = event.clientY; var judgerX = x + obj.offsetWidth; var judgerY = y + obj.offsetHeight; var px = 0; var py = 0; if(judgerX>document.body.clientWidth) { px = 2; } if(judgerY>document.body.clientHeight) { py = 1; } return (px+py); } //-----------MenuPosition return(obj)--------------// function MPreturn(obj) { var topobj = eval(obj.substring(0,obj.length-2)); var trobj = eval("tr"+obj); var x = topobj.style.pixelLeft + topobj.offsetWidth; var y = topobj.style.pixelTop + trobj.offsetTop; obj = eval(obj); var judgerY = obj.offsetHeight + y; var judgerX = obj.offsetWidth + x; var py = 0; var px = 0; if(judgerY>=document.body.clientHeight) { py = 1; } if(judgerX>= document.body.clientWidth) { px = 2; } return (px+py); } //-----------mouseWave()-------------// function mouseWave() { if(mouseCanSound) { theBS.src= "sound/sound.wav"; } } //----------- menu_alpha_down -------// function menu_alpha_down(obj,num) { var obj = eval(obj); if(obj.filters.Alpha.Opacity > 0 ) { obj.filters.Alpha.Opacity += -num; } else { clearInterval(obj.alphaing); obj.filters.Alpha.Opacity = 0; obj.alphaing = false; obj.style.visibility = "hidden"; } } //------------ menu_alpha_up --------// function menu_alpha_up(obj,num) { var obj = eval(obj); if(obj.filters.Alpha.Opacity<100) obj.filters.Alpha.Opacity += num; else { clearInterval(obj.alphaing); obj.filters.Alpha.Opacity = 100; obj.alphaing = false; } } //----------- IE ContextMenu -----------------// function document.oncontextmenu() { return false; } //----------- IE Mouseup ----------------// function document.onmouseup() { if(event.button==2) { HideMenu(0); var obj = eval(JustMenuID) obj.style.visibility = "hidden"; if(obj.alphaing) { clearInterval(obj.alphaing); } obj.filters.Alpha.Opacity = 0; var judger = MMPreturn() if(judger==0) { with(obj.style) { pixelLeft = event.clientX + document.body.scrollLeft; pixelTop = event.clientY + document.body.scrollTop; } } if(judger==1) { with(obj.style) { pixelLeft = event.clientX + document.body.scrollLeft; pixelTop = event.clientY - obj.offsetHeight + document.body.scrollTop; } } if(judger==2) { with(obj.style) { pixelLeft = event.clientX - obj.offsetWidth + document.body.scrollLeft; pixelTop = event.clientY + document.body.scrollTop; } } if(judger==3) { with(obj.style) { pixelLeft = event.clientX - obj.offsetWidth + document.body.scrollLeft; pixelTop = event.clientY - obj.offsetHeight + document.body.scrollTop; } } mouseWave(); obj.style.visibility = "visible"; obj.alphaing = setInterval("menu_alpha_up("+obj.id+","+alphaStep+")",menuSpeed); } } //---------- IE MouseDown --------------// function document.onmousedown() { if(event.button==1) { HideMenu(); var obj = eval(JustMenuID) if(obj.alphaing) { clearInterval(obj.alphaing); } obj.alphaing = setInterval("menu_alpha_down("+obj.id+","+alphaStep+")",menuSpeed); } } //-----> </SCRIPT> <SCRIPT> var one = new MouseMenu("one"); one.addMenu("菜单一",1,"javascript:alert('I am menu');","_self","I am title"); one[0].addLink("连接一",2,"javascript:alert('I am link')") one[0].addHR() one[0].addLink("连接二","","javascript:alert('I am link')") one[0].addMenu("菜单三"); one[0][one[0].length-1].addLink("连接一",1,"javascript:;") one[0].addLink("连接三","","javascript:alert('I am link')") one[0].addLink("连接四","","javascript:alert('I am link')") one.addLink("连接二","","javascript:alert('I am link')") one.addMenu("菜单二",3); one[2].addLink("连接一","","javascript:alert('I am link')") one.addHR(); one.addLink("连接三,多长都可以",4,"javascript:alert('I am link')") </SCRIPT> <P><FONT color=#1a71e6>有声音的哦…… 可以关闭!设置 mouseCanSound = false; 就可以了</FONT></P></BODY></HTML>
所属频道:
菜单导航特效
/
更新时间:2010-05-23
[收藏]
[报错]
[返回列表]
评论加载中....
相关
菜单导航特效
:
CSS+div+js组合强大实现超酷菜单
超酷仿GOOGLE首页导航菜单效果
仿网易的滑动门技术DIV+CSS实现
仿蓝色理想网站的导航菜单
鼠标触及带边框菜单
用JS实现的类似框架的链接导航模式
CSS立体层
右键弹出菜单
纯css的导航下拉菜单
隐藏菜单效果
css模拟title和alt的提示效果
下拉菜单链接页面打开方式选择
菜单导航特效Rss订阅
特效代码搜索
菜单导航特效推荐
菜单效果2
windows XP左侧的菜单效果
很棒的自定义CSS下拉菜单
横向、竖向两个选项卡Tab联动的实现
三级下拉菜单
纯CSS黑色下拉导航条
css模拟title和alt的提示效果
菜单背景自适应宽度的CSs实现方法示例
JS+Css多级可拖动带动画的滑出式展开菜单
下拉菜单,点击后拉出,而非滑过
猜你也喜欢看这些
JS实现鼠标悬停图片交换
Flickr照片分享网的图片预览特效
JavaScript图片扭曲变形效果
漂亮实用的商品图片jquery tips提示框(无图片箭头+阴影)
Js封装匀速循环的横向图片滚动
前后轮翻的JS图片幻灯切换
黑色风格带缓冲的JS焦点图代码
JavaScript实现的图片响应鼠标特效
图片围成环形滚动,有空间感
一款平滑的鼠标放上图片抖动代码
相关链接:
复制本页链接
|
搜索带图形声音的右键菜单
特效说明:
菜单导航模板
-
带图形声音的右键菜单
。
閺€鎯版&閸掑棔闊�
QQ缁屾椽妫�
閺傜増姘顔煎触
閼垫崘顔嗗顔煎触
娴滆桨姹夌純锟�
瀵偓韫囧啰缍�
閻ф儳瀹抽幖婊嗘
婢跺秴鍩楃純鎴濇絻
閺囨潙顦�...