It's easy with jQuery...
$("div:visible")
But if you want to be old school...
var divs = document.getElementsByTagName("DIV");
var elems = [];
for(var i = 0; i < divs.length; i++) {
var div = divs[i];
var vis = div.style.visibility;
if(vis == 'block' || vis == 'inline')
elems.push(div);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…