Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
how to get the text value of span and set a js function to calculate and send an alert of the result
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

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda