i'm making some auto sum input calculator for me, but i have problem, because i don't know how to select multiple inputs which have different names. I know i could just use 'input' instead of exact name, but i need to do calculations just for 5-6inputs not all, so please help me to do it this way..
Code looks now like this:
<script type="text/javascript">
function findTotal(){
var arr = document.getElementsByName('test1');
var tot=0;
for(var i=0;i<arr.length;i++){
if(parseInt(arr[i].value))
tot += parseInt(arr[i].value);
}
document.getElementById('total').value = tot;
}
</script>
So i would like to calculate exactly test1, test2, test3, test4, test5 inputs.
Thanks