var divs = document.getElementsByTagName("div");得到所有的div
for(var i=0;i<divs.length;i++){
if(divs[i].idName == '要显示的div的id'){
divs[i].style.display="block";
}
divs[i].style.display="none";
}
js对<span>标签隐藏显示操作
span隐藏
html:<span id="emailInfoSpan" style="display:none"></span>
span显示
js:
var emailInfoSpan = document.getElementById('emailInfoSpan');
emailInfoSpan.style.display='';