爱易网
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 浏览次数:20220 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<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
上一篇:狡猾的按钮特效
下一篇:点击展开菜单
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
百度“全网寻人”面前的互联网信息枢纽价值
中移动推动感地带3G网聊卡 火拼微信沃卡
都是300元内 乐视盒子与小米盒子对比体验
支付宝全面封杀比特币:充值码淘宝店或遭封禁
传4G牌照国庆节前后发放 TD-LTE制式优先
微信收费形式三选一 腾讯或变身运营商
马斯克的特斯拉能否保持好势头
神州电脑中止IPO面前:再被质疑财务造假
高通反垄断案下月有望落定
推荐阅读
更多>
搜房网遭遇做空 利益保送成“猎杀”焦点
电信设备商淘金中国4G:华为中兴领衔
电信业营改增今起实施 运营商短期利润骤降
小微型IDC云化趋势加剧 云计算未来或现终极模式
全球网络遭史上最大规模攻击:攻击数据每秒300G
众贷网满月开张 网络金融监管再受质疑
湘鄂情剥离餐饮业务进军大数据的底气在哪里?
史玉柱谈创业:5大建议 失败的教训最真实
亚马逊第三方平台真的卖盗版书?
一大波智能路由器正在袭来:小米、360、极路由大PK
打车软件“明补变暗补”背后的小算盘
微软很“捉急”:补贴Win8 重加末尾按钮
P2P平台科迅网疑“跑路” 涉及金额超2700万
英特尔承认,联想最新K系列智能手机放弃英特尔处理器
诺基亚仍是第二大手机商:功用机有利可图
支付宝服务窗后台首曝光 开放用户消费数据
Line风靡亚洲,在北美却进展缓慢
国美在线叫板京东:李俊涛底气在哪?
一个非脑残米粉的思考:小米“成功之道”如何炼成
在线音乐出现“小米公司”不是没有可能