父div中包含一个子div,当父div隐藏后再次显示子DIV中的内容就不显示了
//交换效果//下面是javascript代码,显示DIV滑动门的.functionswitchTab(tabpage,tabpage_getid,tabid_displ...
//交换效果
//下面是javascript代码,显示DIV滑动门的.
function switchTab(tabpage,tabpage_getid,tabid_displayid,tabid){
var oItem = document.getElementById(tabpage);
for(var i=0;i<eval(oItem.childNodes.length);i++){
var x = oItem.childNodes[i];
x.className = "";
//var y = x.getElementsByTagName('a');childNodes(FF),children(IE)
//y[0].style.color="#ff0000";
}
//if(tabpage=="Main_menu")
//document.getElementById(tabid).className = "Selected1";
//else
document.getElementById(tabid).className = "Selected";
var dvs=document.getElementById(tabpage_getid).getElementsByTagName("div");
for (var i=0;i<dvs.length;i++){
if (dvs[i].id==(''+tabid_displayid+tabid))
dvs[i].style.display='block';
else
dvs[i].style.display='none';
}
}
详细内容请看这儿:http://zhidao.baidu.com/question/20214755.html 展开
//下面是javascript代码,显示DIV滑动门的.
function switchTab(tabpage,tabpage_getid,tabid_displayid,tabid){
var oItem = document.getElementById(tabpage);
for(var i=0;i<eval(oItem.childNodes.length);i++){
var x = oItem.childNodes[i];
x.className = "";
//var y = x.getElementsByTagName('a');childNodes(FF),children(IE)
//y[0].style.color="#ff0000";
}
//if(tabpage=="Main_menu")
//document.getElementById(tabid).className = "Selected1";
//else
document.getElementById(tabid).className = "Selected";
var dvs=document.getElementById(tabpage_getid).getElementsByTagName("div");
for (var i=0;i<dvs.length;i++){
if (dvs[i].id==(''+tabid_displayid+tabid))
dvs[i].style.display='block';
else
dvs[i].style.display='none';
}
}
详细内容请看这儿:http://zhidao.baidu.com/question/20214755.html 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询