You can loop through the elements and fetch values.
<div>
<input type="text" class="textbox" value="T1" /><br />
<input type="text" class="textbox" value="T2" /><br />
<input type="text" class="textbox" value="T3" /><br /><br />
<input type="button" value="Set Value" onclick="SetValue()" />
</div>
<script type="text/javascript">
function SetValue() {
var textboxes = document.getElementsByClassName("textbox");
var values = "";
for (var i = 0; i < textboxes.length; i++) {
values += textboxes[i].value + " ";
}
alert(values);
};
</script>
Demo