• 点击右键显示菜单


    <HTML xmlns:v>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>网页特效代码很酷的右键弹出菜单 网页特效 www.qpsh.com</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>
    //作者:www.qpsh.com
    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://www.qpsh.com>首页</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"/><a target=_blank href=http://www.qpsh.com/listpage/103_1.htm>综合</v:roundrect><br>
    <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://www.qpsh.com/listpage/102_1.htm>菜单</v:roundrect><br>
    <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://www.qpsh.com/listpage/104_1.htm>状态</v:roundrect><br>
    <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://www.qpsh.com/listpage/108_1.htm>文本</v:roundrect><br>
    <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://www.qpsh.com/listpage/109_1.htm>页面</v:roundrect><br>
    <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://www.qpsh.com/listpage/112_1.htm>图形</v:roundrect><br>
    <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://www.qpsh.com/listpage/114_1.htm>时间</v:roundrect><br>
    <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://www.qpsh.com/listpage/120_1.htm>按扭</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>

  • 相关阅读:
    MSN、易趣、大旗被挂马 用户浏览后感染机器狗病毒 狼人:
    世界最大漏洞数据库发布最新研究报告 狼人:
    五角大楼最昂贵武器发展项目遭到黑客攻击 狼人:
    RSA呼吁厂商“创造性协作” 共同反击网络威胁 狼人:
    RSA2009:云计算服务如何保证安全? 狼人:
    黑客工具可将恶意软件隐藏于.Net框架 狼人:
    RSA安全大会将亮相25款热门安全产品 狼人:
    目录访问共享C#怎么访问共享目录
    代码下行Jquery结合Ajax和Web服务使用三层架构实现无刷新分页
    输出次数HDU2192:MagicBuilding
  • 原文地址:https://www.cnblogs.com/gdbaby/p/6384967.html
Copyright © 2020-2023  润新知