Хм, я люблю использовать Traversal API
<span>Текст1</span>
<span>Текст2</span>
<span>Текст3</span>
<span>Текст4</span>
<span>Текст5</span>
<script type='text/javascript'>
function load(){
function spanFilter(n){
if (n.tagName == 'SPAN') return NodeFilter.FILTER_ACCEPT;
else return NodeFilter.FILTER_SKIP;
}
var spans = document.createNodeIterator(
document,
NodeFilter.SHOW_ELEMENT,
spanFilter,
false
);
while((span = spans.nextNode()) != null){
span.style.color = 'red';
}
}
setTimeout('load()', 5000);
</script>