web前端|js教程
Js,弹出,下拉菜单
web前端-js教程
流程管理源码,vscode 正则匹配替换,ubuntu 卸载无线,ideal安装tomcat,sqlite3的时间类型,手机中了爬虫病毒怎么办,php排课系统,河北seo优化怎么推广,阅读主题网站的主题,flash网页下载中心,织梦模板文件描述乱码lzw
.menu { BORDER-RIGHT: #006080 2px solid; BORDER-TOP: #80e0ff 2px solid; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: #80e0ff 2px solid; BORDER-BOTTOM: #006080 2px solid; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #40a0c0 }
A.menuItem { BORDER-RIGHT: #000000 0px solid; PADDING-RIGHT: 12px; BORDER-TOP: #000000 0px solid; DISPLAY: block; PADDING-LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 8pt; PADDING-BOTTOM: 2px; BORDER-LEFT: #000000 0px solid; CURSOR: default; COLOR: #ffffff; PADDING-TOP: 2px; BORDER-BOTTOM: #000000 0px solid; FONT-FAMILY: MS Sans Serif, Arial, Tahoma, sans-serif; TEXT-DECORATION: none }
A.menuItem:hover { COLOR: #ffff00; BACKGROUND-COLOR: #004060 }
href="">脚本之家 href="">百度 href="">网 易 href="">江苏音符 href="">央视国际
点击打开菜单
document.getElementById("myMenu").onmouseout = closeMenu;
function openMenu(event, id) {
var el, x, y;
el = document.getElementById(id);
if (window.event) {
x = window.event.clientX + document.documentElement.scrollLeft
+ document.body.scrollLeft;
y = window.event.clientY + document.documentElement.scrollTop +
+ document.body.scrollTop;
}
else {
x = event.clientX + window.scrollX;
y = event.clientY + window.scrollY;
}
x -= 2; y -= 2;
el.style.left = x + "px";
el.style.top = y + "px";
el.style.visibility = "visible";
}
function closeMenu(event) {
var current, related;
if (window.event) {
current = this;
related = window.event.toElement;
}
else {
current = event.currentTarget;
related = event.relatedTarget;
}
if (current != related && !contains(current, related))
current.style.visibility = "hidden";
}
function contains(a, b) {
// Return true if node a contains node b.
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
会员系统源码 登录源码,vscode编译运行命令,戴尔 ubuntu系统,tomcat战机模型,sqlite是单线程吗,爬虫的基本工作原理图,php 远程 执行,湖南企业seo优化策划,ajax瀑布流网站模板,傻瓜网页模板,html5 百度 模板lzw
如果觉得《Js点击弹出下拉菜单效果实例【javascript】》对你有帮助,请点赞、收藏,并留下你的观点哦!