Js+DVML:很酷实用的右键弹出菜单
来源:互联网 发布:网络时时彩算赌博吗 编辑:程序博客网 时间:2024/05/22 12:13
<HTML xmlns:v><HEAD>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效代码|JsCode.CN|---Js+DVML:很酷实用的右键弹出菜单</title>
<STYLE>
v/:*{behavior:url(#default#VML);}
.menulist{position:static;PADDING-TOP:6;LETTER-SPACING:8;HEIGHT:20;TEXT-ALIGN:center;margin-bottom:-2}
</STYLE>
</head>
<BODY oncontextmenu='return false'>
<Script>
var menutime1=null,showobjs1=null //menutime1=循环计时器调用变量,showobjs1=绑定菜单,定时器过程执行时调用
function document.onmouseup(){if(event.button==2)menushow(menu2,60,10)}
function menushow(showobjs,showwid,showsudu){ //右键菜单展开函数
//函数说明:menushow(菜单id,项平均宽度,伸展速度)
if(menutime1!=null){clearInterval(menutime1);menutime1=null}
showobjs.style.left=event.x;showobjs.style.top=event.y;
showobjs1=showobjs.all.tags("roundrect");var showlens=showobjs1.length
for(i=0;i<showlens;i++){showobjs1[i].style.width=0;showobjs1[i].style.visibility="hidden"}
showobjs.style.display=""
menutime1=setInterval("for(i=0;i<"+showlens+";i++){showobjs1[i].style.visibility='';if(showobjs1[i].offsetWidth<"+showwid+"){showobjs1[i].style.width=showobjs1[i].offsetWidth+"+showsudu+";break;}else{if(i=="+(showlens-1)+"){clearInterval(menutime1);menutime1=null}}}",20)
}
function menuclose(showobjs2,showsudu2){ //右键菜单关闭函数
//函数说明:menushow(菜单id,关闭压缩速度)
if(menutime1!=null)return false
showobjs1=showobjs2.all.tags("roundrect");var showlens=showobjs1.length-1
menutime1=setInterval("for(i="+showlens+";i>-1;i--){if(showobjs1[i].offsetWidth>0){try{showobjs1[i].style.width=showobjs1[i].offsetWidth-"+showsudu2+";break;}catch(e){showobjs1[i].style.visibility='hidden';if(i==0){clearInterval(menutime1);menutime1=null}}}}",20)
}
</script>
<span id=menu2 style="position:absolute;Z-INDEX:40000;LEFT:395;TOP:210;color:#739EFE;cursor:hand;display:none;font-size:12px;font-family:宋体" onmouseover="if(event.srcElement.tagName=='roundrect'){event.srcElement.strokecolor='blue';event.srcElement.style.color='blue';event.srcElement.style.marginLeft=10}" onmouseout="if(event.srcElement.tagName=='roundrect'){event.srcElement.strokecolor='#739EFE';event.srcElement.style.color='#739EFE';event.srcElement.style.marginLeft=0}">
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/><a target=_blank href=http://jscode.cn>网格</a></v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>矩阵</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>分界线</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>刷新</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>设置</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项.</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项..</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项...</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE onmouseup="menuclose(menu2,30)">
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>取消</v:roundrect>
</span>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效代码|JsCode.CN|---Js+DVML:很酷实用的右键弹出菜单</title>
<STYLE>
v/:*{behavior:url(#default#VML);}
.menulist{position:static;PADDING-TOP:6;LETTER-SPACING:8;HEIGHT:20;TEXT-ALIGN:center;margin-bottom:-2}
</STYLE>
</head>
<BODY oncontextmenu='return false'>
<Script>
var menutime1=null,showobjs1=null //menutime1=循环计时器调用变量,showobjs1=绑定菜单,定时器过程执行时调用
function document.onmouseup(){if(event.button==2)menushow(menu2,60,10)}
function menushow(showobjs,showwid,showsudu){ //右键菜单展开函数
//函数说明:menushow(菜单id,项平均宽度,伸展速度)
if(menutime1!=null){clearInterval(menutime1);menutime1=null}
showobjs.style.left=event.x;showobjs.style.top=event.y;
showobjs1=showobjs.all.tags("roundrect");var showlens=showobjs1.length
for(i=0;i<showlens;i++){showobjs1[i].style.width=0;showobjs1[i].style.visibility="hidden"}
showobjs.style.display=""
menutime1=setInterval("for(i=0;i<"+showlens+";i++){showobjs1[i].style.visibility='';if(showobjs1[i].offsetWidth<"+showwid+"){showobjs1[i].style.width=showobjs1[i].offsetWidth+"+showsudu+";break;}else{if(i=="+(showlens-1)+"){clearInterval(menutime1);menutime1=null}}}",20)
}
function menuclose(showobjs2,showsudu2){ //右键菜单关闭函数
//函数说明:menushow(菜单id,关闭压缩速度)
if(menutime1!=null)return false
showobjs1=showobjs2.all.tags("roundrect");var showlens=showobjs1.length-1
menutime1=setInterval("for(i="+showlens+";i>-1;i--){if(showobjs1[i].offsetWidth>0){try{showobjs1[i].style.width=showobjs1[i].offsetWidth-"+showsudu2+";break;}catch(e){showobjs1[i].style.visibility='hidden';if(i==0){clearInterval(menutime1);menutime1=null}}}}",20)
}
</script>
<span id=menu2 style="position:absolute;Z-INDEX:40000;LEFT:395;TOP:210;color:#739EFE;cursor:hand;display:none;font-size:12px;font-family:宋体" onmouseover="if(event.srcElement.tagName=='roundrect'){event.srcElement.strokecolor='blue';event.srcElement.style.color='blue';event.srcElement.style.marginLeft=10}" onmouseout="if(event.srcElement.tagName=='roundrect'){event.srcElement.strokecolor='#739EFE';event.srcElement.style.color='#739EFE';event.srcElement.style.marginLeft=0}">
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/><a target=_blank href=http://jscode.cn>网格</a></v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>矩阵</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>分界线</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>刷新</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>设置</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项.</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项..</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项...</v:roundrect><br>
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE onmouseup="menuclose(menu2,30)">
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>取消</v:roundrect>
</span>
</body>
</html>
- Js+DVML:很酷实用的右键弹出菜单
- 实用的Context.js 右键菜单
- js 右键弹出自定义菜单
- vc++ 右键菜单的弹出
- 右键弹出菜单的自动更新
- js实现右键弹出多级菜单特效
- VC鼠标右键弹出菜单的实现
- 解决右键弹出菜单慢的问题
- VC鼠标右键弹出菜单的实现
- Dev 右键弹出菜单的使用方法
- MFC右键弹出菜单的示例
- 鼠标右键弹出快捷菜单的实现
- MFC右键弹出菜单的创建
- 右键弹出菜单和快捷键的设置
- 右键单击屏幕,弹出菜单的代码。
- 右键弹出自定义菜单,很有意思呀!
- JS伸缩的菜单 + 右键菜单
- java右键弹出菜单
- getElement
- 任意自然数分解为连续自然数和问题
- C#类和对象
- Web应用中缓存的七种武器
- DropDownList
- Js+DVML:很酷实用的右键弹出菜单
- 改变IE滚动条的样式
- 我昨天写了个DIV+CSS的页面,做了个个人主页
- 取两个字符串的并集与交集的函数
- 第4代白盒测试方法之“如何选择嵌入式白盒测试工具”
- CppUnit测试框架入门
- 第五项修炼
- 美女在男人玩弄中产生?
- 从客户端检测到有潜在危险的Request.Form 值