爱易网
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特效
鼠标下的导航链接
鼠标下的导航链接
日期:2014-05-18 浏览次数:20201 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<body>区域中: <style> <!-- .menuskin{ position:absolute; width:165px; background-color:menu; border:2px solid black; font:normal 12px Verdana; line-height:18px; z-index:100; visibility:hidden; } .menuskin a{ text-decoration:none; color:black; padding-left:10px; padding-right:10px; } #mouseoverstyle{ background-color:highlight; } #mouseoverstyle a{ color:white; } --> </style> <script language="JavaScript1.2"> //Pop-it menu- By Dynamic Drive //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com //This credit MUST stay intact for use var linkset=new Array() //SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT linkset[0]='<div class="menuitems"><a href="http://dynamicdrive.com">Dynamic Drive</a></div>' linkset[0]+='<div class="menuitems"><a href="http://javascriptkit.com">JavaScript Kit</a></div>' linkset[0]+='<div class="menuitems"><a href="http://freewarejava.com">Freewarejava</a></div>' linkset[1]='<div class="menuitems"><a href="http://msnbc.com">MSNBC</a></div>' linkset[1]+='<div class="menuitems"><a href="http://cnn.com">CNN</a></div>' linkset[1]+='<div class="menuitems"><a href="http://abcnews.com">ABC News</a></div>' linkset[1]+='<div class="menuitems"><a href="http://www.washingtonpost.com">Washington Post</a></div>' ////No need to edit beyond here var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1 var ns6=document.getElementById&&!document.all var ns4=document.layers function showmenu(e,which){ if (!document.all&&!document.getElementById&&!document.layers) return clearhidemenu() menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : "" menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj if (ie4||ns6) menuobj.innerHTML=which else{ menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>') menuobj.document.close() } menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height eventX=ie4? event.clientX : ns6? e.clientX : e.x eventY=ie4? event.clientY : ns6? e.clientY : e.y //Find out how close the mouse is to the corner of the window var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY //if the horizontal distance isn't enough to accomodate the width of the context menu if (rightedge<menuobj.contentwidth) //move the horizontal position of the menu to the left by it's width menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth else //position the horizontal position of the menu where the mouse was clicked menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX //same concept with the vertical position if (bottomedge<menuobj.contentheight) menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight else menuobj.thestyle.top=ie4? document.body.scrollTop+event.clientY : ns6? window.pageYOffset+eventY : eventY menuobj.thestyle.visibility="visible" return false } function contains_ns6(a, b) { //Determines if 1 element in contained in another- by Brainjar.com while
上一篇:狡猾的按钮特效
下一篇:点击展开菜单
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
华为坚持不上市究竟为何?不差钱也不想冒风险
中电信率先推移动转售业务 中下旬批量上市
解读苹果收购Beats背后动机:库克在想什么?
微软很“捉急”:补贴Win8 重加末尾按钮
中方抗议美方限购IT设备 紧张关系加剧
搜狐前副总编何毅加盟乐视 任车联网公司CEO
众贷网满月开张 网络金融监管再受质疑
广东移动高层受调查 中移动或现更大反腐风暴
史玉柱谈创业:5大建议 失败的教训最真实
推荐阅读
更多>
微软小冰复活再战移动端:改与米聊、易信和触宝合作
微信将商场O2O战火烧到了阿里巴巴老家
薛蛮子取保后首次发微博表示:辜负你们了
“扫黄打非”下9158否认遭整顿
网曝富士康500万iphone遭退货是确证的事
喜大普奔:2016年国内乘客有望在飞机上使用手机
华为、小米和联想在中国手机市场上演“三国杀”
史上最严电话实名制9月实行 三大难题待解
谁说黑莓没救?他们在悄悄地深耕企业级市场,在这个领域,苹果三星算什么,他们远远不是黑莓的对手
苹果已经允许开发者提交64位应用程序
酷派首抓4G时机大丰收,未来份额必降无疑
马云的SNS之梦有了新目标 收购“微博”
创维冲击500亿梦想:转型硬件和内容供应商
阿里入股虎嗅:媒体的脊梁弯了?未必!
微信企业号必须搬走四座大山,否则只能铩羽而归!
总部大楼已换微软Logo:回忆诺基亚的兴衰史
568倍PE,“长跑者”亚马逊的高估值之谜
阿里马云:我觉得互联网还有十年可以做
看,网络文学今日之繁盛;忆,纯真去哪了?
金山毒霸安全中心: XP退役后首个高危漏洞来了