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

215
Views
Imprimir contenido de la ventana modal Bootstrap

Tengo una tabla en laravel con diferentes datos en las líneas y un botón que abre un mondal con la información, pero cuando abro el modal y hago clic en el botón dentro del modal para imprimir, no funciona.

 <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <button id="btnPrint" type="button" class="btn btn-default">Print</button> <script> document.getElementById("btnPrint").onclick = function() { printElement(document.getElementById("printThis")); } function printElement(elem) { var domClone = elem.cloneNode(true); var $printSection = document.getElementById("printSection"); if (!$printSection) { var $printSection = document.createElement("div"); $printSection.id = "printSection"; document.body.appendChild($printSection); } $printSection.innerHTML = ""; $printSection.appendChild(domClone); window.print(); } </script>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

<button id="btnPrint"type="button" class="btn btn-default">Print</button>

Simplemente agregue onclick="window.print()" en la etiqueta de su botón y elimine el resto del script.

Por favor, déjeme saber si funciona.

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!