<div><input class = "input" value = "1"></div>
<div><input class = "input" value = "2"></div>
<div><input class = "input" value = "3"></div>
<script>
var arr = document.getElementsByClassName('input'),
len = arr.length,
data = [];
for (var i=0; i < len; i++){
data.push(arr[i].value);
}
alert("Inputs: "+len+'\n'+data);
</script>
вот тут сравнение есть наглядное
http://jsperf.com/getelementsbyclass...selectorall/18