Cheer 发表于 2007-4-28 11:01:23

鼠标特效这个特效可不一般啊...看看你的右键

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件
<style type="text/css">

body         {font-size: 9pt;}
table          {font-size: 9pt; cursor: default; margin: 0;}
tr             {height: 20;}
tr.over      {font-size: 9pt; color: #ffffff; background-color: #66aadd; cursor: default;}
tr.out         {font-size: 9pt; color: #ffffff; background-color: #004477; cursor: default;}
div.rm_div   {position: absolute; filter: alpha(opacity='95'); display: none; border: 2px outset #3377aa; background-color: #004477; width: 0; height: 0;}
hr.sperator    {border: 1px inset #3377aa;}

</style>

<meta name="microsoft theme" content="none"></head>

<body background="images/bj.gif" oncontextmenu="self.event.returnvalue=false" link="#00ff00" vlink="#00ff00" alink="#00ff00">
<script language="jscript">
<!--
function rightmenu()
{
    this.addextendmenu=addextendmenu;
    this.additem=additem;
    this.getmenu=getmenu;
    this.hideall=hideall;
    this.i_onmouseover=i_onmouseover;
    this.i_onmouseout=i_onmouseout;
    this.i_onmouseup=i_onmouseup;
    this.p_onmouseover=p_onmouseover;
    this.p_onmouseout=p_onmouseout;
    a_rbpm = new array();
    htmlstr= "";
    htmlstr += "<!-- rightbutton popmenu -->\n";
    htmlstr += "\n";
    htmlstr += "<!-- popmenu starts -->\n";
    htmlstr += "<div id='e_rbpm' class='rm_div'>\n";
                        // rbpm = right button pop menu
    htmlstr += "<table width='100%' border='0' cellspacing='0'>\n";
    htmlstr += "<!-- insert a extend menu or item on here for e_rbpm -->\n";
    htmlstr += "</table>\n";
    htmlstr += "</div>\n";
    htmlstr += "<!-- insert a extend_menu area on here for e_rbpm -->";
    htmlstr += "\n";
    htmlstr += "<!-- popmenu ends -->\n";
}
function addextendmenu(id,name,parent)
{
    var tempstr = "";
    if(htmlstr.indexof("<!-- extend menu area : e_"+id+" -->") != -1)
    {
      alert("e_"+id+"already exist!");
      return;
    }
    eval("a_"+parent+".length++");
    eval("a_"+parent+" = id");// 将此项注册到父菜单项的id数组中去
    tempstr += "<!-- extend menu area : e_"+id+" -->\n";
    tempstr += "<div id='e_"+id+"' class='rm_div'>\n";
    tempstr += "<table width='100%' border='0' cellspacing='0'>\n";
    tempstr += "<!-- insert a extend menu or item on here for e_"+id+" -->";
    tempstr += "</table>\n";
    tempstr += "</div>\n";
    tempstr += "<!-- insert a extend_menu area on here for e_"+id+" -->";
    tempstr += "<!-- insert a extend_menu area on here for e_"+parent+" -->";
    htmlstr = htmlstr.replace("<!-- insert a extend_menu area on here for e_"+parent+" -->",tempstr);

   
    eval("a_"+id+" = new array()");
    tempstr= "";
    tempstr += "<!-- extend item : p_"+id+" -->\n";
    tempstr += "<tr id='p_"+id+"' class='out'";
    tempstr += " onmouseover='p_onmouseover(\""+id+"\",\""+parent+"\")'";
    tempstr += " onmouseout='p_onmouseout(\""+id+"\",\""+parent+"\")'";
    tempstr += " onmouseup=window.event.cancelbubble=true;";
    tempstr += " onclick=window.event.cancelbubble=true;";
    tempstr += "><td nowrap>";
    tempstr += "   "+name+"      </td><td style='font-family: webdings; text-align: right;'>4";
    tempstr += "</td></tr>\n";
    tempstr += "<!-- insert a extend menu or item on here for e_"+parent+" -->";
    htmlstr = htmlstr.replace("<!-- insert a extend menu or item on here for e_"+parent+" -->",tempstr);
}
function additem(id,name,parent,location)
{
    var tempstr = "";
    var itemstr = "<!-- item : i_"+id+" -->";
    if(id == "sperator")
    {
      tempstr += itemstr+"\n";
      tempstr += "<tr style='height: 3;' class='out' onclick='window.event.cancelbubble=true;' onmouseup='window.event.cancelbubble=true;'><td colspan='2'><hr class='sperator'></td></tr>";
      tempstr += "<!-- insert a extend menu or item on here for e_"+parent+" -->";
      htmlstr = htmlstr.replace("<!-- insert a extend menu or item on here for e_"+parent+" -->",tempstr);
      return;
    }
    if(htmlstr.indexof(itemstr) != -1)
    {
      alert("i_"+id+"already exist!");
      return;
    }
    tempstr += itemstr+"\n";
    tempstr += "<tr id='i_"+id+"' class='out'";
    tempstr += " onmouseover='i_onmouseover(\""+id+"\",\""+parent+"\")'";
    tempstr += " onmouseout='i_onmouseout(\""+id+"\")'";
    tempstr += " onclick='window.event.cancelbubble=true;'";
    if(location == null)
      tempstr += " onmouseup='i_onmouseup(\""+id+"\",\""+parent+"\",null)'";
    else
      tempstr += " onmouseup='i_onmouseup(\""+id+"\",\""+parent+"\",\""+location+"\")'";
    tempstr += "><td nowrap>";
    tempstr += "   "+name+"   ";
    tempstr += "</td><td></td></tr>\n";
    tempstr += "<!-- insert a extend menu or item on here for e_"+parent+" -->";
    htmlstr = htmlstr.replace("<!-- insert a extend menu or item on here for e_"+parent+" -->",tempstr);
}
function getmenu()
{
    return htmlstr;
}
function i_onmouseover(id,parent)
{
    var item;
    if(parent != "rbpm")
    {
      var parentitem;
      parentitem = eval("p_"+parent);
      parentitem.classname="over";
    }
    item = eval("i_"+id);
    item.classname="over";
    hideall(parent,1);
}
function i_onmouseout(id)
{
    var item;
    item = eval("i_"+id);
    item.classname="out";
}
function i_onmouseup(id,parent,location)
{
    var parentmenu;
    window.event.cancelbubble=true;
    onclick();
    parentmenu = eval("e_"+parent);
    parentmenu.display="none";
    if(location == null)
      eval("do_"+id+"()");
    else
      window.open(location);
}
function p_onmouseover(id,parent)
{
    var item;
    var extend;
    var parent;
    if(parent != "rbpm")
    {
      var parentitem;
      parentitem = eval("p_"+parent);
      parentitem.classname="over";
    }
    hideall(parent,1);
    item = eval("p_"+id);
    extend = eval("e_"+id);
    parent = eval("e_"+parent);
    item.classname="over";
    extend.style.display="block";
    extend.style.posleft=document.body.scrollleft+parent.offsetleft+parent.offsetwidth-4;
    if(extend.style.posleft+extend.offsetwidth > document.body.scrollleft+document.body.clientwidth)
      extend.style.posleft=extend.style.posleft-parent.offsetwidth-extend.offsetwidth+8;
    if(extend.style.posleft < 0) extend.style.posleft=document.body.scrollleft+parent.offsetleft+parent.offsetwidth;
    extend.style.postop=parent.offsettop+item.offsettop;
    if(extend.style.postop+extend.offsetheight > document.body.scrolltop+document.body.clientheight)
      extend.style.postop=document.body.scrolltop+document.body.clientheight-extend.offsetheight;
    if(extend.style.postop < 0) extend.style.postop=0;
}
function p_onmouseout(id,parent)
{
}
function hideall(id,flag)
{
    var area;
    var temp;
    var i;
    if(!flag)
    {
      temp = eval("e_"+id);
      temp.style.display="none";
    }
    area = eval("a_"+id);
    if(area.length)
    {
      for(i=0; i < area.length; i++)
      {
      hideall(area,0);
      temp = eval("e_"+area);
      temp.style.display="none";
      temp = eval("p_"+area);
      temp.classname="out";
      }
    }
}

document.onmouseup=onmouseup;
document.onclick=onclick;
function onmouseup()
{
    if(window.event.button == 2)
    {
      var popmenu;
      popmenu = eval("e_rbpm");
      hideall("rbpm",0);
      popmenu.style.display="block";
      popmenu.style.posleft=document.body.scrollleft+window.event.clientx;
      popmenu.style.postop=document.body.scrolltop+window.event.clienty;
      if(popmenu.style.posleft+popmenu.offsetwidth > document.body.scrollleft+document.body.clientwidth)
      popmenu.style.posleft=document.body.scrollleft+document.body.clientwidth-popmenu.offsetwidth;
      if(popmenu.style.posleft < 0) popmenu.style.posleft=0;
      if(popmenu.style.postop+popmenu.offsetheight > document.body.scrolltop+document.body.clientheight)
      popmenu.style.postop=document.body.scrolltop+document.body.clientheight-popmenu.offsetheight;
      if(popmenu.style.postop < 0) popmenu.style.postop=0;
    }
}
function onclick()
{
    hideall("rbpm",0);
}
// add your function on following
function do_viewcode(){window.location="view-source:"+window.location.href;}
function do_help(){window.showhelp(window.location);}
function do_exit() {window.close();}
function do_refresh() {window.location.reload();}
function do_back() {history.back();}
function do_forward() {history.forward();}
function do_author(){alert("网名:linlin\ne_mail:love_cgl@sina.com个人主页:(正在制作中)\n")}
-->
</script>
<div id="snwcwt">

<p> </p>
</div><script language="jscript">
<!--
var menu = new rightmenu();
menu.addextendmenu("location","我的链接","rbpm");
    menu.addextendmenu("stunet","个人收藏","location");
      menu.additem("stu_nith","第九城市","stunet","http://www.the9.com/");
      menu.additem("stu_kingdom","超凡国度","stunet","http://www.akingdom.net");
            menu.additem("sperator","","stunet",null);
      menu.additem("stu_kaxiu","卡秀贺卡","stunet","http://www.kaxiu.com/");
      menu.additem("stu_qiao","七巧flash","stunet","http://www.7qiao.com");
      menu.additem("sperator","","stunet",null);
      menu.additem("stu_paper","壁纸千寻","stunet","http://desktop.cis.com.cn/");
      menu.additem("stu_lauge","搞笑第一站","stunet","http://www.yaguo.com/");
    menu.additem("sperator","","location",null);
    menu.addextendmenu("computer","电脑类网站","location");
      menu.addextendmenu("c_all","综合性网站","computer");
      menu.additem("ca_yesky","天极网","c_all","http://www.yesky.com");
      menu.addextendmenu("c_program","程序员网站","computer");
      menu.additem("cp_program","java2000","c_program","http://java2000.wol.com.cn/");
      menu.addextendmenu("c_magzine","杂志网站","computer");
      menu.additem("cm_cpcw","电脑报","c_magzine","http://www.cpcw.com");
      menu.additem("cm_cfan","电脑爱好者","c_magzine","http://www.cfan.net.cn");
      menu.additem("cm_popsoft","大众软件","c_magzine","http://www.popsoft.com");
      menu.addextendmenu("c_luntan","脚本论坛","computer");
      menu.additem("cl_js","无优脚本","c_luntan","http://www.51js.com");
      menu.addextendmenu("c_book","软件下载","computer");
      menu.additem("cb_soft","软件屋","c_book","http://www.softhouse.com.cn/");
    menu.addextendmenu("hacker","黑客网站","location");
      menu.additem("hk_honker","红客联盟","hacker","http://www.cnhonker.com");
      menu.additem("hk_hacker","黑白网络","hacker","http://www.521hacker.com");
            menu.additem("hk_qq","qq大联盟","hacker","http://www.qq365.net");
    menu.additem("sperator","","location",null);
    menu.addextendmenu("lmovie","影视天地","location");
      menu.additem("mov_wcums","华西网上影院","lmovie","http://202.115.100.8/");
    menu.addextendmenu("lmusic","音乐空间","location");
      menu.additem("mus_tyfo","天虎音乐网","lmusic","http://music.tyfo.com/");
      menu.additem("mus_langqin","浪琴音乐","lmusic","http://www.langqin.net/");
      menu.additem("mus_sogua","搜刮音乐网","lmusic","http://www.sogua.com/");
    menu.addextendmenu("lmud","游戏链接","location");
             menu.addextendmenu("uo","uo专题","lmud");
            menu.additem("lmud_chinauo","chinauo","uo","http://www.chinauo.com");
      menu.additem("lmud_uochina","uo中华网","uo","http://uo.xaonline.com");
      menu.additem("lmud_uohome","创世纪家园","uo","http://mhui.myrice.com");
      menu.addextendmenu("game","电脑游戏","lmud");
      menu.additem("lmud_he","游戏家园","game","http://www.pcgamehome.com");
      menu.additem("lmud_people","游民部落","game","http://games.sina.com.cn");
            menu.additem("lmud_gamecn","中国游戏联盟","game","http://cngl.softhouse.com.cn");
    menu.additem("sperator","","location",null);
    menu.addextendmenu("lemail","电子邮局","location");
      menu.additem("email_263","21cn免费电子邮局","lemail","http://www.21cn.com");
    menu.addextendmenu("collections","综合性网站","location");
      menu.additem("coll_china","中华网","collections","http://www.china.com/");
      menu.additem("coll_sina","新浪首页","collections","http://www.sina.com.cn/");
      menu.additem("coll_263","263首都在线","collections","http://www.263.net/");
    menu.addextendmenu("leave","离开","rbpm");
    menu.additem("forward","前进","leave",null);
    menu.additem("back","后退","leave",null);
    menu.additem("sperator","","leave",null);
    menu.additem("exit","退出","leave",null);
menu.additem("viewcode","查看源代码","rbpm",null);
menu.additem("refresh","刷新","rbpm",null);
menu.additem("sperator","","rbpm",null);
menu.additem("help","帮助","rbpm",null);
menu.additem("sperator","","rbpm",null);
menu.additem("author","关于作者","rbpm",null);
document.writeln(menu.getmenu());
//snwcwt.innertext=menu.getmenu();
-->
</script>
页: [1]
查看完整版本: 鼠标特效这个特效可不一般啊...看看你的右键