You don't get locale-aware number parsing in JavaScript, so you'll have to do a string replacement to get something parseFloat()
will handle:
<div id="inputs">
<input type="text" />
<input type="text" />
...
</div>
<p>
<input type="button" id="summer" value="Sum" />
<input type="text" id="sum" />
</p>
<script type="text/javascript">
document.getElementById('summer').onclick= function() {
var sum= 0;
var inputs= document.getElementById('inputs').getElementsByTagName('input');
for (var i= inputs.length; i-->0;) {
var v= inputs[i].value.split(',').join('.').split(' ').join('');
if (isNaN(+v))
alert(inputs[i].value+' is not a readable number');
else
sum+= +v;
}
document.getElementById('sum').value= sum;
};
</script>
(You don't need a <form> element or any input names if it's a purely client-side thing you don't ever expect to submit.)
Note this uses floating point numbers, so the sum of 0.1 and 0.2 may not be exactly what you think. If you are looking at money amounts, floating point isn't suitable and you'll have to come up with a fixed-point or decimal-based number parser.