爱易网
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特效
JS树形菜单
JS树形菜单
日期:2014-05-18 浏览次数:20425 次
以下是HTML网页特效代码,点击运行按钮可查看效果:
以下是程序代码
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>树形菜单2</title> <style type="text/css"> <!-- .headtd1 { background: #00A4E1; border: 2px outset; border-color: #00BBFF #0077FF #0077FF #00BBFF; cursor: hand; font-size: 9pt} .headtd2 { background: #20C1FF; border: 2px outset; border-color: #60D3FF #0077FF #0077FF #60D3FF; cursor: hand; font-size: 9pt} .bodytd { background: #99CCFF; border: 2px outset; border-color: #B0D8FF #0077FF #0077FF #B0D8FF; font-size: 9pt} --> </style> <script language="JavaScript"> scores = new Array(20); var numTotal=0;NS4 = (document.layers) ? 1 : 0;IE4 = (document.all) ? 1 : 0;ver4 = (NS4 || IE4) ? 1 : 0; if (ver4) { with (document) { write("<STYLE TYPE='text/css'>"); if (NS4) { write(".parent {position:absolute; visibility:visible}"); write(".child {position:absolute; visibility:visible}"); write(".regular {position:absolute; visibility:visible}") } else { write(".child {display:none}") } write("</STYLE>"); }}function getIndex(el) { ind = null; for (i=0; i<document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.id == el) { ind = i; break; } } return ind;}function arrange() { nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height; for (i=firstInd+1; i<document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.visibility != "hide") { whichEl.pageY = nextY; nextY += whichEl.document.height; } }}function initIt(){ if (!ver4) return; if (NS4) { for (i=0; i<document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide"; } arrange(); } else { divColl = document.all.tags("DIV"); for (i=0; i<divColl.length; i++) { whichEl = divColl(i); if (whichEl.className == "child") whichEl.style.display = "none"; } }}function expandIt(el) { if (!ver4) return; if (IE4) { whichEl1 = eval(el + "Child"); for(i=1;i<=numTotal;i++){ whichEl = eval(scores[i] + "Child"); if(whichEl!=whichEl1) { whichEl.style.display = "none"; } } whichEl1 = eval(el + "Child"); if (whichEl1.style.display == "none") { whichEl1.style.display = "block"; } else { whichEl1.style.display = "none"; } } else { whichEl = eval("document." + el + "Child"); for(i=1;i<=numTotal;i++){ whichEl = eval("document." + scores[i] + "Child"); if(whichEl!=whichEl1) { whichEl.visibility = "hide"; } } if (whichEl.visibility == "hide") { whichEl.visibility = "show"; } else { whichEl.visibility = "hide"; } arrange(); }}onload = initIt; </script> <script language="JavaScript"> <!-- //该函数在调用过程中只需要在将要点击的单元格内的onclick事件中调用showme函数即可 //function showme(obj1, obj2)该函数主要为使点击的对象高亮度显示,并调用moveme函数,参数obj1为母体即<div>标签的id,obj2为点击对象本身 //functi
上一篇:狡猾的按钮特效
下一篇:可刷新的JS树形菜单特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
苹果优势逐渐丧失 传即将推出廉价iPhone
余额宝收益率跌破5% 银行系宝宝收益率赶超
雷军会做赔钱生意?迅雷跌破发行价 市值仅7亿美元
2019双12阿里云老用户怎么参加拼团活动 老用户拼团方法
微软小冰复活再战移动端:改与米聊、易信和触宝合作
看蜗牛如何放水养鱼,盘活生态系统
小米打响手机价格战 为米3铺路或另有所图
靠谱分析:6月发生的WWDC和谷歌I/O大会,将会出现哪些新产品?
全球网络遭史上最大规模攻击:攻击数据每秒300G
推荐阅读
更多>
阿里巴巴450亿勾画“现代服务业”藏宝图
十亿美元的告别礼:三星为何要大举重组?
史玉柱卸任巨人网络CEO 继位人选引猜想
谷歌欲收买WhatsApp添加砝码 对方否认
京东确定IPO定价区间 最高募资16.9亿美元
《归来》遭视频网盗播 乐视网状告小米盒子侵权
微信今天大面积崩溃 腾讯:因光缆施工被挖断
iPhone 6 Plus要召回是谣言
埃里克杰克森:阿里IPO估值至少1500亿美元
Twitter收购印度手机营销公司ZipDial
诺基亚依托规模效应 猛攻国际市场空白
迅雷欲3300万美元收购金山快盘 预计9月完成
苹果6月20日发布iPhone5S 触摸屏概念股生动
蘑菇街CEO陈琪:2015将回归社会化电商
魅族黄章惹怒芙蓉姐姐 将跨界推女神手机
微软提示XP只剩365天寿命:用户被绑架?
Line风靡亚洲,在北美却进展缓慢
组建铁塔公司倒逼运营商改革 或加速4G网建设
百视通:Xbox One汉化获批 游戏迷欢呼吧
首批四款“官方”打车软件发布:均为安卓版本