爱易网
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 浏览次数:20214 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<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
上一篇:狡猾的按钮特效
下一篇:点击展开菜单
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
苹果iWatch或使用量产液态金属 将取代玻璃
巨人网络回应央视 否认应用黑客停止诈骗
乐视今日临时停牌 受广电酝酿新规消息影响
微软大幅调整Bing在华策略:从高大上到接地气
从WPS到office365,中国企业能否赶超美国?
屌丝程序猿发家机会来了 用大数据来做生意!
亚马逊Fire Phone:请别拿我跟苹果三星比
TD是完成中国梦的一个契机
用户喊话当当网:我彻底把你们丢弃了
推荐阅读
更多>
联想国庆完成收购IBM x86服务器
央行暂停二维码支付及虚拟信用卡 支付宝微信不知情
IT时代周刊总编辑曹健:投资人刘志硕印象记
京东终于想明白,这些年错过的财运,都藏在女人的时装下
奇虎360证明了“惟平台化才能生存”是谬论,中国互联网不能少了周鸿祎
Kindle入华遭遇国内厂商“围剿 ” 电信也参战
微软最后的救命稻草Win 8份额继续上升
“合聚变”来了 UC优视确认并入阿里巴巴
阿里巴巴450亿勾画“现代服务业”藏宝图
在线音乐出现“小米公司”不是没有可能
PC迎9年来出货量新低 平板电脑渐成主流
谷歌董事长成花花公子:情史足以媲美涂鸦
中移动本月推手机钱包 iPhone遭边缘化
评论:马云的成功建立在什么基础上很值得怀疑
网易云音乐能否为丁磊拿到移动互联网门票?
八位知名设计师评iOS7:新鲜但复杂
易迅大众点评缩水执行“七天后悔权”被约谈
北京电信推“0月租卡”,同网通话免费
三星石墨烯制备技术获突破
OPPO Find7体验测 Find7综测