[提问]一小问题。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
相关问答:
我的源文件如下:
<html>
<head> <title>show picture </title>
<script>
function change(fileName)
{
......
我做一个页面,里面包括了文本框、文本域等等,我现在想在页面上加一个按钮,当我点击按钮时候,就将本页面到出成word文档。大家帮帮我吧。急啊。。。。。。。
使用js操作的话,除非本地安全允许,这样可使用Active ......
例:
<table width="100%" align="center" id="mytbl" border="0" bgcolor="#EEEEEE">
<tr>
<td class ......
JScript code:
<a href="#" onclick="numsort()">sort by price</a>
<ul id="list">
<li><span class="n">green day</span> &l ......
例如:
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
<tr>
& ......