下拉功能,FF,chrome及ie9以上都可以,就是ie8不行,不知道是代码错误还是兼容问题,求改正!startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList; $("#testtab2").tab({
tabId:"#tabtag2", //切换控制器的ID
tabTag:"li", //切换控制器标签
conId:"#tabcon2", //内容容器ID
conTag:"div", //容器标签
act:"click", //点击触发 也可以不设置 默认就为click 设置为 mouseover则为划过
effact: "scrollx", //横向滚动效果
dft:2 //设置起始显示序列
})
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList; $("#testtab2").tab({
tabId:"#tabtag2", //切换控制器的ID
tabTag:"li", //切换控制器标签
conId:"#tabcon2", //内容容器ID
conTag:"div", //容器标签
act:"click", //点击触发 也可以不设置 默认就为click 设置为 mouseover则为划过
effact: "scrollx", //横向滚动效果
dft:2 //设置起始显示序列
})
<li><a class="navbotton" href="#">首页</a></li>
<li><a class="navbotton" href="#">▶ 热门文档</a>
<ul>
<li><a href="#">最多下载</a></li>
<li><a href="#">最新上传</a></li>
<li><a href="#">最多好评</a></li>
</ul>
</li>
<li><a class="navbotton" href="#">▶ 热门文档</a>
<ul>
<li><a href="#">我的收藏</a></li>
<li><a href="#">我的上传</a></li>
<li><a href="#">我的下载</a></li>
</ul>
</li>
<li><a href="#">账户设置</a>
</li>
</ul>
你习惯把代码大卸八块,然后把其中一部分发上来让别人玩拼代码游戏吗?没有CSS代码怎么测试效果呢?