This Domain(Admin5.com) is for Sale:

一个简单的javascript菜单

时间:2007-12-27  来源:不详  作者:林子

item.blur();
}
return item;
}

file://显示子菜单
this.showMenu=function(index){
if(menu.selectedIndex!=-1) menu.pads[selectedIndex].style.display="none";
menu.board.style.pixelLeft=menu.barItems[index].offsetLeft 2;
file://menu.board.style.pixelHeight="";
if(menu.pads[index].rows.length>0) menu.board.style.display="";
else menu.board.style.display="none";
menu.pads[index].style.display="";
menu.selectedIndex=index;
} dedecms.com

file://隐藏子菜单
this.hideMenu=function(){
if(menu.selectedIndex==-1) return;
menu.barItems[menu.selectedIndex].className=id "_barItem";
menu.pads[selectedIndex].style.display="none";
menu.selectedIndex=-1;
menu.board.style.display="none";
} dedecms.com

file://执行菜单命令;
this.execute=function(ary){
if(ary[2]==null) return;
if(ary[1]=="js") { eval(ary[2]); menu.hideMenu(); }
else if(ary[1]==null || ary[1].toLowerCase=="_self") location.href=ary[2];
else{ var x=window.open(ary[2],ary[1]); x.focus(); }
}

织梦内容管理系统

file://建立子菜单的显示面板
this.crtMenuBoard=function(){
document.write(
"<div id='" id "_board' style='position:absolute;width:160px;height:10px;left:0px;top:20px;background-color:#666666;z-index:99;display:none;'>"
"<div style='position:absolute;width:100%;height:100%;left:0px;top:0px;'>"
"<iframe id='" id "_frame' name='" id "_frame' width='100%' height='100%' frameborder='0' scrolling='no'></iframe>"
"</div>"
"<div id='" id "_pad' style='position:absolute;width:100%;height:100%;left:0px;top:0px;'></div>"
"</div>"
);
menu.board=document.getElementById(id "_board");
menu.pad=document.getElementById(id "_pad");
menu.pad.className=id "_board";
menu.pad.onselectstart=function(){ return false;}
}

本文来自织梦

file://增加对像的一个子元素
this.crtElement=function(el,p){
return p.appendChild(document.createElement(el));
}

copyright dedecms

file://安装菜单;
this.setup=function(){
menu.crtMenuBoard();
menu.crtMenuBar();
document.attachEvent("onclick",menu.hideMenu);
}

本文来自织梦

menu.setup();
}
</script>
</body>
</html> dedecms.com

看完这篇,您有何感觉呢?

文章评论

共有位Admini5网友发表了评论 查看完整内容

24小时热门信息