document.getElementById().styl.display的问题 5
求助。帮我看看,老是错误为空或不是对象(document.getElementById(id).style.display='';)-------------------...
求助。帮我看看,
老是错误 为空或不是对象
(document.getElementById(id).style.display = '';)
------------------------------------------------------------------
<SCRIPT type=text/javascript>
var siteUrl = "//";
function aiyz_setTab(area,id) {
var tabArea = document.getElementById(area);
var contents = tabArea.childNodes;
for (i=0; i<contents.length; i++) {
if (contents[i].className=='tabContent') { contents[i].style.display = 'none';}
}
document.getElementById(id).style.display = '';
var tabs = document.getElementById(area+'Tabs').getElementsByTagName('a');
for (i=0; i<tabs.length; i++) { tabs[i].className = ''; }
document.getElementById('tab'+id).className = 'xqNewsbg';
}
</SCRIPT> 展开
老是错误 为空或不是对象
(document.getElementById(id).style.display = '';)
------------------------------------------------------------------
<SCRIPT type=text/javascript>
var siteUrl = "//";
function aiyz_setTab(area,id) {
var tabArea = document.getElementById(area);
var contents = tabArea.childNodes;
for (i=0; i<contents.length; i++) {
if (contents[i].className=='tabContent') { contents[i].style.display = 'none';}
}
document.getElementById(id).style.display = '';
var tabs = document.getElementById(area+'Tabs').getElementsByTagName('a');
for (i=0; i<tabs.length; i++) { tabs[i].className = ''; }
document.getElementById('tab'+id).className = 'xqNewsbg';
}
</SCRIPT> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询