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

171
Views
Use la lista del matraz en javascript como matriz

Con javascript quiero insertar una selección con opciones:

 function newRow() { var tbodyRef = document.getElementById('myTable').getElementsByTagName('tbody')[0]; var lastRow = tbodyRef.rows[tbodyRef.rows.length - 1]; var lastCell = lastRow.cells[lastRow.cells.length - 1]; var newCell = newRow.insertCell(); newCell.innerHTML = '<select name="reportList" method="GET" action="/">'+ '<option value="data">data.value</option>' + '</select>'; }

En la parte inferior de mi archivo HTML:

 <script>var data = '{{ reportList | tojson }}';</script>

Mi pregunta es cómo puedo usar la lista reportList en mi javascript como opciones (en lugar de data.value). En este momento, la variable 'datos' es una cadena y no una matriz, ¿tengo que dividirla en una cadena o hay otra forma?

about 4 years ago · Santiago Gelvez
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!