<span data-title="bla-bla">1</span>
<span data-title="bla-bla">2</span>
<span data-title="bla-bla">3</span>
<script>
var elems = document.querySelectorAll('*[data-title]');
for (var i = 0; i < elems.length; i++) {
alert( elems[i].innerHTML );
}
</script>