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

141
Views
Listado de entradas de un formulario en una matriz - JAVASCRIPT

Hola, estoy tratando de obtener información de un montón de cuadros de entrada en una matriz en javascript

 function lagreBilett(){ let inputElement = document.getElementsByName("bilett"); let bilett = {}; inputElement.forEach ((info) => { bilett[info.id] = info.value; info.value = ''; }); console.log(bilett); let ut = ""; const biletter = []; biletter.push(bilett); for(let bilett of biletter){ ut += "Antall: " + bilett["antall"] + " Fornavn: " + bilett["fornavn"] + " Etternavn: " + bilett["etternavn"] + " Telefonnr: " + bilett["telefonnr"] + " Epost: " + bilett["epost"]; } document.getElementById("resultat").innerHTML = ut; }

Pero cada vez que llamo a la función, en lugar de crear un nuevo objeto y colocarlo en la matriz con el otro objeto, simplemente lo reemplaza y crea uno nuevo, creo que esto se debe a que tiene el mismo nombre, es su de todos modos para ¿resuelve esto?

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!