[提问]一小问题。javascript 选项卡切换
HTML code:
</html>
<head>
<script type="text/javscript" language="javascript">
function setTab(thisObj,Num)
{
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0;i<tabList.length;i++)
{
if(i==Num)
{
thisObj.className="mouseOver";
document.getElementById(tabObj+"_Content"+i).className = "active";
}
else
{
tabList[i].className="mouseOut";
document.getElementById(tabObj+"_Content"+i).className="hide";
}
}
}
</script>
<style>
.nTab{
width:790px;
height:180px;
margin-top:5px;
}
.tabTitle{
width:100%;
height:30px;
overflow:hidden;
}
.tabTitle ul{
margin-top:2px;
list-style:none;
}
.tabTitle li{
width:90px;
height:28px;
padding:6px 0px 0px 0px;
cursor:hand;
font-weight:bold;
text-align:center;
display:inline-block;
float:left;
}
.tabTitle li.mouseOver{
color:White;
background-color:Green;
}
.tabTitle li.mouseOut{
color:white;
}
.tabContent{
width:100%;
height:auto;
overflow:visible;
padding:8px;
clear:both;
float:left;
}
.tabContent .active{
diplay:block;
}
.tabContent .hide{
display:none;
}
</style>
</h
相关问答:
我在后台调用JavaScript的时候,他是在后台把事件的代码执行一次后在执行JavaScript方法
有什么办法 在执行JavaScript方法的时候停住,在执行后面的代码
不太明白啊,说清楚点吧
就是执行后台代码的时候 ......
如何实现当鼠标悬停控件上时,出现该控件的尾部显示对应的层,鼠标移动到该层上进行相应的操作,当鼠标移除时(不在控件上也不在层上)层隐藏,
http://topic.csdn.net/u/20090830/23/5e5ded07-7216-46c2-9712- ......
如何实现当鼠标悬停控件上时,出现该控件的尾部显示对应的层,鼠标移动到该层上进行相应的操作,当鼠标移除时(不在控件上也不在层上)层隐藏,
HTML code:
<html>
<head>
<meta http-equiv= ......
我也来一个趣味javascript:
打开以下html文件,依次按下G,L,C三个键,就会有奇迹出现!!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" ......
例:
<table width="100%" align="center" id="mytbl" border="0" bgcolor="#EEEEEE">
<tr>
<td class ......