更新时间:2023-12-03 09:15:46
使用jQuery很容易...
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);
}