爱易网
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 浏览次数:20153 次
以下是程序代码
<!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 +
上一篇:仿taobao拼音首字检索效果
下一篇:结构和表现分离的选项卡特效代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
优酷土豆兼并一年:依然处于烧钱形状
途牛旅游网今晚挂牌纳斯达克 融资1亿美元
八位知名设计师评iOS7:新鲜但复杂
酷派首抓4G时机大丰收,未来份额必降无疑
阿里物流搭上邮政:京东,我们在终点等你!
苹果音乐效劳新战略:与唱片商停止流媒体协作
科技巨匠体验谷歌眼镜:戴上了就不想摘上去
SAP高层调整:联席CEO孟鼎铭成唯一掌舵人
苹果iWatch或使用量产液态金属 将取代玻璃
推荐阅读
更多>
地图导航骤起杀机 百度高德重新定义商业模式
论:三大运营商运用商店逆袭并非不能够
三星石墨烯制备技术获突破
十亿美元的告别礼:三星为何要大举重组?
NoomWeight减肥
巨人网络回应央视 否认应用黑客停止诈骗
安全服务机构:公布2014年度最糟糕的25个密码
解析2014年阿里百度等五大互联网巨头深度布局
谷歌欲收买WhatsApp添加砝码 对方否认
曝阿里巴巴一怀孕员工过劳死 加班情况引争议
苹果收购Beats交易或将延期尚需解决5大问题
湘鄂情剥离餐饮业务进军大数据的底气在哪里?
诺基亚再缩阵线 封锁上海旗舰店全力蜕变
P2P平台科迅网疑“跑路” 涉及金额超2700万
淘宝公布新规:升级售假卖家惩罚力度
京东进驻微信一级入口或影响自身战略布局
从百度世界大会看大数据
苹果iWatch或使用量产液态金属 将取代玻璃
苹果优势逐渐丧失 传即将推出廉价iPhone
联通丹东公司一高管造假套出手机变卖被判刑7年