爱易网
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 浏览次数:20207 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<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
上一篇:狡猾的按钮特效
下一篇:点击展开菜单
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
广东移动高层受调查 中移动或现更大反腐风暴
蜗牛移动董事长石海:号卡被叫停属乌龙事件
继续涨:微博IPO第二交易日 收盘大涨11.71%
NEC拟出售移动效劳子公司NEC Mobile
微软与摩托罗拉授权协议涵盖Android和Chrome设备
传搜狗估值12亿美元 与360谈判进入白热化
杨元庆去年总薪酬1.33亿元
同为70前后人,马云为什么总是像外星人那么瘦
Facebook思科联手推免费WiFi 欲覆盖全美
推荐阅读
更多>
中国移动承诺再降4G资费 网络漫游至50个国家
蓝宝石PK大猩猩玻璃:作为屏幕谁更有优势?
迅雷高管解读财报:收购快盘可快速融入小米
靠价格战赚取资费套餐利润差,虚拟运营商必死无疑
神州泰岳雪上加霜:副总违规买卖遭罚
携程整合去哪儿陷入僵局 欲联手老对手艺龙
互联网情色众多 Facebook与9158态度大不同
百度“全网寻人”面前的互联网信息枢纽价值
国美苏宁线上首度正面PK 京东列席4月电商战
前苹果顾问批判iPhone命名:不应加S
亚马逊落户上海自贸区:美国货直邮中国
空气污染器市场乱象丛生 选购需慎重
易信工具性优势突出 丁磊三板斧或先砍在飞信上
华为坚持不上市究竟为何?不差钱也不想冒风险
阿里收购UC 五年姻缘换来移动新格局
迅雷再次在美提交IPO申请
史玉柱卸任巨人网络CEO 继位人选引猜想
诺基亚因充电器问题暂停销售Lumia 2520平板电脑
薛蛮子取保后首次发微博表示:辜负你们了
独立工具APP:为亿级用户的商业化而愁