<div><input class = "input" value = "1"></div>
<div><input class = "input" value = "2"></div>
<div><input class = "input" value = "3"></div>
<script>
var array = Array.prototype.map.call(document.querySelectorAll("div > .input"), function(el) {
return el.value ;
}) ;
alert(array.join("\n")) ;
</script>