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

129
Views
Selección de casilla de verificación múltiple en AJAX cuando se hace clic en el botón
 <script> function display() { $.ajax({ url: "tmp.php", type: "get", data: { a: $('#selecttmp option:selected').val() } }).done(function(data) { $('#result').text(data); alert(data); $(document).ready(function() { $('.#buttontmp').click(function() { $('.data').prop('checked', this.checked); }); }); }); } </script>

ingrese la descripción de la imagen aquí

Cuando se hace clic en el button , lee el select option value y marca cada casilla de verificación relevante según su name .

Con AJAX, el select option value se puede encontrar sin ninguna actualización, pero las casillas de verificación no están marcadas. ¿Estoy usando jquery incorrectamente?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

 <script> function display() { $.ajax({ url: "test.php", type: "get", data: { a: $('#selectest option:selected').val() } }).done(function(data) { $('#result').text(data); alert(data); $('input:checkbox[name='+data+']').each(function() { this.checked = true; }); }); } </script>

He descubierto la solución yo mismo, gracias por la corrección que hizo @CBroe.

about 4 years ago · Juan Pablo Isaza 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!