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

222
Views
¿Cómo crear una lista desplegable dinámicamente usando jQuery?

¿Cómo se crea una lista desplegable dinámicamente usando jQuery? Por lista desplegable, me refiero a un <select> con sus valores <option> asociados.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Simplemente cree los elementos como cualquier elemento.

Ejemplo:

 var data = { 'foo': 'bar', 'foo2': 'baz' } var s = $('<select />'); for(var val in data) { $('<option />', {value: val, text: data[val]}).appendTo(s); } s.appendTo('body'); // or wherever it should be
over 4 years ago · Santiago Trujillo Report

0

En su forma más simple,

 var opt = "<option> -- Select -- </option>"; $(opt).wrap('<select />'); $('#some-container-div').html(opt);
over 4 years ago · Santiago Trujillo Report

0

http://hungred.com/how-to/tutorial-jquery-select-box-manipulation-plugin/

over 4 years ago · Santiago Trujillo Report
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!