lamer,
<html>
<head>
</head>
<body>
<div class="info">111</div>
<div class="info">222</div>
<div class="info">333</div>
<br>
<input type="button" value="search" onclick="search();">
<script>
function search() {
getElementsByClass = function(classList, node) {
var node = node || document,
list = node.getElementsByTagName('*'),
length = list.length,
classArray = classList.split(/\s+/),
classes = classArray.length,
result = [], i,j
for(i = 0; i < length; i++) {
for(j = 0; j < classes; j++) {
if(list[i].className.search('\\b' + classArray[j] + '\\b') != -1) {
result.push(list[i])
break
}
}
}
return result
}
var elements = getElementsByClass('info');
for (i=0; i < elements.length; i++) {
elements[i]=elements[i].textContent || elements[i].innerText || "";
}
alert(elements.join(' - '))
}
</script>
</body>
</html>