爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
Js DVML:很酷实用的右键弹出菜单
Js DVML:很酷实用的右键弹出菜单
日期:2014-05-18 浏览次数:20176 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<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> <v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE> <v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>矩阵</v:roundrect> <v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE> <v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>分界线</v:roundrect> <v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE> <v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>刷新</v:roundrect> <v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE> <v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>设置</v:roundrect> <v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE> <v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项</v:roundrect> <v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE> <v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项.</v:roundrect> <v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE> <v:fill type=gradient opacity=.4 color=#739EFE color2=white angle="50"/>项..</v:roundrect> <v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE> <v:fill type=
上一篇:鼠标触及带边框菜单
下一篇:JS省市二级联动网页特效菜单
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
IT企业人才争夺战打响:员工待遇水涨船高
华为变阵:任正非调整三大业务布局
科技巨匠体验谷歌眼镜:戴上了就不想摘上去
去看看外面的世界吧!别窝里斗了,中国在线旅游商们
三星石墨烯制备技术获突破
巧用百度推行系统 突显竞价效果
电信设备商淘金中国4G:华为中兴领衔
中方抗议美方限购IT设备 紧张关系加剧
TD是完成中国梦的一个契机
推荐阅读
更多>
iPhone 6 Plus要召回是谣言
小米打响手机价格战 为米3铺路或另有所图
中移动五大基地将整改成公司:被指易滋生腐败
微软确认 Surface 计划更多尺寸和LTE 版本
网友爆料称微软雇水军宣传主机Xbox One
工信部或本月17日向联通电信颁发FDD牌照
微信企业号必须搬走四座大山,否则只能铩羽而归!
历史惊人相似:如今的库克 曾经的鲍尔默
同程旅游融资后变土豪 如何烧钱占领市场?
让一让,小米4来了,碰见米粉请务必绕道走!
工商总局开查电商“七日退货”
NEC拟出售移动效劳子公司NEC Mobile
FDD牌照短期不会发放 联通电信暗自提速建网
618首日看京东阿里不同策略,鹿死谁手?
三星已经将Galaxy S5视为失败之作?
全球网络遭史上最大规模攻击:攻击数据每秒300G
苹果股价突破100美元大关:投资者看好iPhone 6
可靠消息称微型针孔偷拍设备拟全面禁止
眼球识别技术EyeVerify融资600万美元 360参投
三星石墨烯制备技术获突破