Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

91
Views
resultado incorrecto de la suma de los 2 campos

buenas noches, he estado tratando desde ayer de averiguar cómo hacer que mi script funcione correctamente, pero después de varios intentos sigue sin funcionar, el error se atribuye a la suma que se muestra en los registros individuales, en lugar de agregarse, se coloca uno al lado del otro. ¿Cómo puedo corregirlo?

 function addFields(){ var number = document.getElementById("copie").value; var numeroiniziale = document.getElementById("inizio").value; var container = document.getElementById("container"); var risultato = parseInt("inizio"); while (container.hasChildNodes()) { container.removeChild(container.lastChild); } for (i=0;i<number;i++){ container.appendChild(document.createElement("br")); container.appendChild(document.createTextNode("N° " + (i+1))); container.appendChild(document.createElement("br")); var input = document.createElement("input"); input.type = "text"; input.placeholder = (risultato) + (i+1); container.appendChild(input); container.appendChild(document.createElement("br")); } }
 Numero iniziale:<input type="text" id="inizio" name="inizio" value=""><br /> Quanti ne genero:<input type="text" id="copie" name="copie" value=""><br /> <a href="#" id="filldetails" onclick="addFields()">Genera</a> <div id="container"></div>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!