All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
在PHP中全面阻止SQL注入式攻击之二_php资料_编程技术
.NET基础知识-.NET框架_[Asp.Net教程]
C#几种常用的排序算法_.net资料_编程技术
ASP.NET Remoting体系结构(八)
Windows Vista下安装SQL Server 2005_[SQL Server教程]
Delphi执行sql server区间查询
基于PHP的AJAX技术实现文件异步上传_[PHP教程]
aspnet_wp.exe,could,not,be,started_.net资料_编程技术
最近收集的有用的Javscript小技巧_JavaScript技术_编程技术
触发器学习_[SQL Server教程]
Reading number is top 10 pictures
关于提肛的健身效果
Play for Free show breast in a world of ice and snow
The real super beauty6
Ashlynn Brooke photograph of a group3
妹子最好别玩单反
Look for from human art net, is good--2
陪睡门马睿菈自曝写真 称首拍大尺度照片2
人美胸美腿更美2
美女浴室写真1
The money of more than 100 countries and regions4
Download software ranking
美女游泳记
Unix video tutorial8
Unix video tutorial19
Boxer vs Yellow4
SP4 for SQL2000
塘西风月痕
WebService在.NET中的实战应用教学视频 → 第4集
C++教程第四版
都市狐狸姑娘传
linux初级教程
delv published in(发表于) 2013/12/31 6:41:10 Edit(编辑)
斜体样式的导航条_JavaScript技术_编程技术

斜体样式的导航条_JavaScript技术_编程技术

斜体样式的导航条_JavaScript技术_编程技术-你的首页-uuhomepage.com










[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]




已经封装成 js 文件的代码:




// javascript Document

function preset()
{
document.getElementById("itemlist").childNodes[selectindex].firstChild.firstChild.className="style1";
document.getElementById("itemlist").childNodes[selectindex+1].childNodes[0].childNodes[0].className="style2";
innersubclass();
}
function focusthis(obj)
{
clearselect();
obj.className = "style1";
obj.parentNode.parentNode.nextSibling.firstChild.firstChild.
className="style2";
innersubclass(obj);
}
function innersubclass(obj)
{
if (obj==null)
{
document.getElementById("subclass").innerHTML = subclass[selectindex];
}else
{
for(i=0; i {
if(obj == document.getElementById("itemlist").childNodes[i].firstChild.firstChild)
{
document.getElementById("subclass").innerHTML = subclass[i];
}
}
}
}
function recover()
{
clearselect();
preset();
innersubclass();
}
function clearselect()
{
for (i=0; i {
document.getElementById("itemlist").childNodes[i].firstChild.firstChild.className="style0";
}
}




在代码编写过程中,发现 Firefox 对 DOM 解释和 IE 对 DOM 的解释差别较大。虽然上面的代码也兼容ff,但实现的方法不太标准,近期需要补习一下 FF 下的DOM。




目前此效果仅能应用于网站导航条,如果要做成斜体的选项卡效果,还需要调整一下代码,但估计不用重写了,呵呵






















添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.