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

163
Views
La nueva fila clonada de Javascript no tiene una entrada de cuadro de selección seleccionada

he clonado mis valores de la primera fila a la segunda fila y así sucesivamente, funciona para entradas y variables de tiempo, etc. todo excepto los valores del cuadro de selección

 function cloneRow() { var row = document.getElementById("rowToClone"); // find row to copy var table = document.getElementById("tableToModify"); // find table to append to var clone = row.cloneNode(true); // copy children too clone.id = "newID"; // change id or other attributes/contents table.appendChild(clone); // add new row to end of table }

EDITAR: solución alternativa encontrada para que el cuadro de selección no se clone. simplemente agregue onchange al cuadro de selección y actualice la función.

 <select id="transports" name="schedule_type[]" onchange="update(this);"> <option value="" disabled selected>Choose Type</option> <option value="Weekday">Weekday</option> <option value="Holiday">Holiday</option> <option value="Friday">Friday</option> <option value="Sunday">Sunday</option> </select> function update(val){ val.options[val.selectedIndex].setAttribute("selected",""); }
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!