爱易网
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 浏览次数:20253 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
要完成此效果把如下代码加入到<body>区域中 <SCRIPT> function _init(){ for(var i=0;i<document.all.length;i++){ if(document.all[i].getAttribute("menu")){ var attribs = _eat_attrib(document.all[i].getAttribute("menu")); var tree = new Array(); var src = document.all.item(attribs["src"]).innerText; // get the config info from the contents of the designated source element src = _strip(src); // remove whitespace informatin tree = _compile(tree,src); // turn it into a multilevel array // at this time, associate the element the // menu is attached to with the created menuing elements var menuId = _menus.length; document.all[i].menuId = menuId; document.all[i].onmouseover = _rootmouseover; document.all[i].onmouseout = _rootmouseout; // get and preset designer preferences var attribs = _eat_attrib(document.all[i].getAttribute("menu")); attribs["border-width"] = (attribs["border-width"]!=null?attribs["border-width"]:1); attribs["border-color"] = (attribs["border-color"]!=null?attribs["border-color"]:"black"); attribs["background"] = (attribs["background"]!=null?attribs["background"]:"white"); attribs["highlight"] = (attribs["highlight"]!=null?attribs["highlight"]:"#DCDCDC"); attribs["font-size"] = (attribs["font-size"]!=null?attribs["font-size"]:"normal"); attribs["font-family"] = (attribs["font-family"]!=null?attribs["font-family"]:""); attribs["font-color"] = (attribs["font-color"]!=null?attribs["font-color"]:""); attribs["icon-color"] = (attribs["icon-color"]!=null?attribs["icon-color"]:"black"); attribs["arrow"] = (attribs["arrow"]!=null?attribs["arrow"]:true); attribs["showrow"] = (attribs["showrow"]!=null?attribs["showrow"]:true); attribs["height"] = (attribs["height"]!=null?attribs["height"]:22); attribs["width"] = (attribs["width"]!=null?attribs["width"]:150); attribs["arrow-offset"] = (attribs["arrow-offset"]!=null?Number(attribs["arrow-offset"]):135); attribs["menu-offset"] = (attribs["menu-offset"]!=null?Number(attribs["menu-offset"]):1); attribs["menu-topoffset"] = (attribs["menu-topoffset"]!=null?Number(attribs["menu-topoffset"]):0); attribs["wait"] = (attribs["wait"]!=null?Number(attribs["wait"]):500); document.all[i].attribs = attribs; // now, create all of the needed elements for this menu _create(document.all[i],tree); } } } window.onload = _init; ///////////////////////// ///////////////////////// //// takes a position and a string, //// returns the position of the next unpaired "]" character function _pair(after,str){ while(1){ var nextA = str.indexOf("[",after + 1); var nextB = str.indexOf("]",after + 1); if(nextA == -1){ return nextB; } if(nextA > nextB){
上一篇:狡猾的按钮特效
下一篇:相当漂亮的导航窗
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
中移动财报外的"五座大山":运营商沦为走秀陪衬
微软史上最大规模裁员,一半诺基亚员工
二代 iPad Air将配备2GB内存?为同屏多任务做准备
迅雷高管解读财报:收购快盘可快速融入小米
独立工具APP:为亿级用户的商业化而愁
9158屌丝逆袭 从在线“夜总会”转型KTV
NoomWeight减肥
FDD牌照12月将发放 联通电信双4G反击中移动
联想国庆完成收购IBM x86服务器
推荐阅读
更多>
新浪微博推粉丝头条功能 意欲与大号分成
三星起诉LG在冰箱广告中玷污其企业笼统
Android应用审核乱象:诈骗软件冲上排行榜首
互联网金融一周年:余额宝最接地气,比特币最作死
国网公司将加快组建 业界人士称困难重重
银河证券王锦炎:金融业如何使用大数据
玩游戏式的趣味戒烟App:Kwit
支付宝27日晚间曝严重破绽:买卖记载可被搜索
腾讯再次重申:普通微信誉户相对不收费
中国电信内外受困 去电信化思绪待改
阿朗力避步北电后尘 急切停止自我革新
iPhone5S组件曝光 印证杀手级功能存在
iPhone 6将于10月17日内地上市:售5288元起
“世界杯+618”集体磨刀的本质是绑架全民
人们为什么总愿尝试新社交网络?
途牛旅游网今晚挂牌纳斯达克 融资1亿美元
三问刘强东:京东为何近来火气这么大?
科技巨匠体验谷歌眼镜:戴上了就不想摘上去
评论:马云的成功建立在什么基础上很值得怀疑
搜狐与奇虎360或结盟对抗BAT