function Inputs1()
{
var total = 0;
var coll = document.getElementsByName("input1")
for ( var i = 0; i<coll.length; i++)
{
var ele = coll[i];
total += parseInt(ele.value);
}
var Display = document.getElementById("Display");
Display.innerHTML = total;
}
<input name="input1" onkeyup="Inputs1()" />
<input name="input1" onkeyup="Inputs1()" />
<span id="Display"></span>
so i want to make two span with two different input (one is input1 and the other is input2) how do i make so the javascript take the span output numbers, calculate it, and then put it in alert that activated by pressing a button