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

218
Views
Cómo imprimir div específico CON su css aplicado

Creé un botón que cuando hace clic en él, abrirá una ventana para imprimir un div específico (el div de todos).

Ver imágenes a continuación:

  1. El proyecto inicial El proyecto inicial.

  2. ¿Qué veo cuando hago clic en el botón de imprimir? ingrese la descripción de la imagen aquí

Como puede ver cuando hago clic en el botón Imprimir, muestra solo todos sin el css aplicado. ¿Cómo puedo hacer esto?

JS para el botón de impresión:

 <script type="text/javascript"> function printDiv(divName) { var printContents = document.getElementById(divName).innerHTML; w=window.open(); w.document.write(printContents); w.print(); w.close(); } </script>

HTML para el botón de imprimir:

 <input type="button" id="print-btn" onclick="printDiv('printArea')" value="print a div!"/>
about 4 years ago · Santiago Trujillo
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!