js tab效果代码增强版
body {
font-family: Arial,"宋体";
font-size:9pt;
}
td { font-size:12px;;
}
.mousehand{
cursor:hand;
}
.titletable{
padding-left:5px;
background-color:#E9E9E9; }
table.TabBarLevel1{
}
table.TabBarLevel1 td{
border:1px solid #CCCCCC;
height:20px;
background-color:#E1E1E1;
}
table.TabBarLevel1 td.Selected{
border-bottom-width:0px;
background-color:#ffffff;
}
table.TabBarLevel1 td.Black{
border-left-width:0px;
border-top-width:0px;
border-right-width:0px;
background-color:#FFFFFF;
}
table.Content{
border-left:1px solid #CCCCCC;
border-right:1px solid #CCCCCC;
border-bottom:1px solid #CCCCCC;
}
|
function switchTab(tabpage,tabid,action,type){
var oItem = document.getElementById(tabpage);
for(var i=1;i
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
<script type="text/javascript">
function $(objName)
{
if(document.getElementById)
{
return document.getElementById(objName );
}
else if(document.layers)
{
return eval("document.layers['" + objName +"']");
}
else
{
return eval('document.all.' + objName);
}
}
function switchTab(tabpage,tabid,action,type){
var oItem = $(tabpage);
for(var i=1;i<6;i++){
var x = $(type + 'Tab' + i);
//alert(x);
x.className = "mousehand";
//var y = x.getElementsByTagName('a');
//y[0].style.color="#333333";
}
$(tabid).className = "Selected";
//gethotimagelist(type+'_'+action);
closeall(action);
$(action).style.display="block";
}
function closeall(action){
for(var ii=1; ii<5; ii++){
var noclose;
noclose="div"+ii;
if (noclose!=action){
$(noclose).style.display="none";
}
}
}
</script>