Good I would like you to help with this simple form, it is that you can capture 3 numbers from the form, that you can store them in a vector and show them with another show function. I can not make him keep the data, he just repeats it to me. Does anyone have any suggestions to work with this type of data?
<input type="text" id="numero1">
<input type="text" id="numero2">
<input type="text" id="numero3">
<input type="button" value="Capturar" onclick="Capturar()">
<input type="button" value="Mostrar" onclick="Mostrar()">
savearray = [];
var Capturar = function(){
var array = [];
for (var i = 0; i < 3; i++) {
array[i] = parseFloat(document.getElementById("numero"+(i+1)).value);
savearray.push (array[i]);
}
}
var Mostrar = function(){
for (var i = 0; i < savearray.length; i++) {
document.write (savearray[i]);
}
}