JAVASCRIPT   29

ClickHereToPrint

Guest on 5th July 2022 07:29:04 AM

  1. <! -
  2. function ClickHereToPrint(){ ClickHereToPrint função () (
  3. try{ try (
  4. var oIframe = document.getElementById('ifrmPrint'); oIframe var = document.getElementById ('ifrmPrint');
  5. var oContent = document.getElementById('divToPrint').innerHTML; oContent var = document.getElementById ('divToPrint'). innerHTML;
  6. var oDoc = (oIframe.contentWindow || oIframe.contentDocument); oDoc var = (oIframe.contentWindow | oIframe.contentDocument |);
  7. if (oDoc.document) oDoc = oDoc.document; if (oDoc.document) oDoc = oDoc.document;
  8. oDoc.write(<head><title>title</title>); oDoc.write ("<head> <<title> título / title>");
  9. oDoc.write(</head><body onload='this.focus(); this.print();'>); oDoc.write ("</ head> <body onload='this.focus(); this.print();'>");
  10. oDoc.write(oContent +</body>); oDoc.write (+ oContent "</ body>");
  11. oDoc.close(); oApp.Workbooks.Add ();
  12. } )
  13. catch(e){ catch (e) (
  14. self.print(); self.print // –></script> / / ->

Raw Paste


Login or Register to edit or fork this paste. It's free.