<html>
<head>
<title>example</title>
</head>
<body>
<input type="text" value="1"><br />
<input type="text" value="2"><br />
<input type="text" value="3"><br />
<input type="text" value="4"><br />
<input type="text" value="5"><br />
<script>
Array.prototype.forEach.call(document.querySelectorAll('input[type=text]'), function (ths)
{
console.log(ths.value);
});
</script>
</body>
</html>