爱易网
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 浏览次数:20284 次
以下是程序代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Phenix PanelBar</title> <script language="javascript"> /*--------------------------------------------------| | Phenix PanelBar | www.seu.edu.cn | |---------------------------------------------------| | | | I believe one day I can fly like phenix! | | | | Finished: 17.11.2004 | |--------------------------------------------------*/ //item object //alert("arrived here"); function PhenItem(id,pid,label,url,type,img,over,img2,over2,title,target){ this.id=id; this.pid=pid; this.label=label; this.url=url; this.title=title; this.target=target; this.img=img; this.over=over; this.img2=img2; this.over2=over2; this.type=type; //this._ih = false; //is it the head item? this._hc = false; //has the child item? this._ls = false; //has sibling item? this._io = false; //whether the panelbar is open? }; //menu object function PhenMenu(objName) { this.config = { closeSameLevel : true }; //alert("asdsdf"); this.obj = objName; this.items = []; this.root = new PhenItem(-1); }; //add a new item to the item array PhenMenu.prototype.add = function(id,pid,label,url,type,img,over,img2,over2,title,target){ this.items[this.items.length] = new PhenItem(id,pid,label,url,type,img,over,img2,over2,title,target); }; // Outputs the menu to the page PhenMenu.prototype.toString = function() { //alert("arrived here"); var str = '<div>\n'; if (document.getElementById) { str += this.addItem(this.root); } else str += 'Browser not supported.'; str += '\n</div>'; //alert(str); //document.write(str); //alert(this.items[0]._hc); return str; }; // Creates the menu structure PhenMenu.prototype.addItem = function(pItem) { var str = ''; //var n=0; for (var n=0; n<this.items.length; n++) { if(this.items[n].pid == pItem.id){ var ci = this.items[n]; //alert(ci.pid); //alert(ci.id); this.setHS(ci); //alert("item:"+ci._hc); //alert(ci._ls); str += this.itemCreate(ci, n); if(ci._ls) break; } } return str; }; // Creates the node icon, url and text PhenMenu.prototype.itemCreate = function(pItem, itemId) { //alert(pItem.type.toLowerCase()); var str = ''; if(pItem.type == 'header') str = '<table width="100%" class="header" valign="middle" onmouseover="this.className=\'headerSelected\'" onmouseout="this.className=\'header\'" onclick="'+this.obj+'.o('+itemId+')"><tr><td>'; else str = '<table width="100%" class="item" valign="middle" onmouseover="this.className=\'itemOver\'" onmouseout="this.className=\'item\'" onclick="'+this.obj+'.o('+itemId+')"><tr><td>'; if (pItem.img) { str += ' <img id="i' + this.obj + itemId + '" src="' + pItem.img + '" alt="" onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/>'; } if (pItem.url) { str += '<a id="s' + this.obj + itemId + '" class="navigation_item" href="' + pItem.url +
上一篇:狡猾的按钮特效
下一篇:结构和表现分离的选项卡特效代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
HDS发布《2013中国CIO洞察白皮书》
充斥着假消息负能量的“秘密”缺乏普适性
神奇约炮应用被禁 改名后重返苹果应用商店
途牛旅游网今晚挂牌纳斯达克 融资1亿美元
“宽带中国”计划已正式上升为国家战略
OPPO创始人陈明永:我们是怎么做营销的
陈天桥之鉴:产品创新被扼杀那些事
快递企业征收“份子钱” 成全了谁 苦了谁?
赴美开店,阿里11Main准备好了吗?
推荐阅读
更多>
TD是完成中国梦的一个契机
腾讯再次重申:普通微信誉户相对不收费
阿里巴巴上市后雅虎将面临更大的业绩压力
京东确定IPO定价区间 最高募资16.9亿美元
柳传志马云陷舆论漩涡:请不要辜负这个时代
中移动五大基地将整改成公司:被指易滋生腐败
雅安地震救灾前线的科技之手 微弱而暖和
同为70前后人,马云为什么总是像外星人那么瘦
欧洲6万人起诉Facebook隐私侵权
智能手机:中国手机市场最受关注十五款产品清点
银联布局二维码支付,“擦边球”生态不能自救
支付宝曝平安破绽:转账信息被谷歌抓取
“论文查重”网店一月收入竟过百万
2018年阿里云双11活动如何参加?1折优惠大攻略
诺基亚因充电器问题暂停销售Lumia 2520平板电脑
电信业营改增今起实施 运营商短期利润骤降
阿朗力避步北电后尘 急切停止自我革新
阿里巴巴450亿勾画“现代服务业”藏宝图
曝阿里巴巴一怀孕员工过劳死 加班情况引争议
华为、小米和联想在中国手机市场上演“三国杀”