Q:

i want to sum 6 inputs and set the value to another input with javascript

I want to sum 6 inputs and set the value to another input with javascript.
https://jsfiddle.net/arispapapro/1qbjd36c/9
<form>
  <input type="text" name="no301" class="form-control" id="no301" placeholder="">
  <input type="text" name="no301" class="form-control" id="no302" placeholder="">
  <input type="text" name="no301" class="form-control" id="no303" placeholder="">
  <input type="text" name="no301" class="form-control" id="no304" placeholder="">
  <input type="text" name="no301" class="form-control" id="no305" placeholder="">
  <input type="text" name="no301" class="form-control" id="no306" placeholder="">
  <input type="text" name="no307" class="form-control" id="thesum" placeholder="307">
</form>

Javascript:
var no301 = document.getElementById("no301").value;
var no302 = document.getElementById("no302").value;
var no303 = document.getElementById("no303").value;
var no304 = document.getElementById("no304").value;
var no305 = document.getElementById("no305").value;
var no306 = document.getElementById("no306").value;
var no307 = document.getElementById("no307").value;

var sum = no301 + no302 + no303 + no304 + no305 + no306;

sum.onchange = function() {
  thesum.value = sum;  
}

thesum.onchange = function() {
  sum.value = thesum;
}

A:

Check the fiddle: https://jsfiddle.net/1qbjd36c/13/
$("form .form-control").not("#thesum").on("input", function() {
  var getSum = 0;
  $("form .form-control").not("#thesum").filter(function() { if($.isNumeric($(this).val())) return $(this).val();  }).each(function() {
  getSum+=parseFloat($(this).val());
  });
  $("#thesum").val(getSum);
});

$("form .form-control") A tag and class selector has been utilized to reference the target.
not("#thesum") added a not selector in order to avoid the change of input of Resulting TEXT field.
on("input", function() { utilized ON-INPUT event, to trigger all input formats, which includes paste of clip text too.
.filter(function() { utilized filter function to value only numeric values.
getSum+=parseFloat($(this).val());, here use of + indicates summing upon with the previous value to the variable, in other words, recursive change on value, which returns the sum of all iterated values.

