Mithun Pradhan

Mithun Pradhan

  • 1.6k
  • 150
  • 21.1k

How Button click to print "divPrint" section?

Jan 16 2024 10:58 AM

My Code

<div id="divPrint">
    <!-- Your content goes here -->
    <div class="prnt-top">
        <div class="img-section">
            <img src="/img/printLogo.gif" alt="logo" />
        </div>
        <div class="div-main-header-section">
            <span class="heading-font-color">Intenational Chemical Laboratory</span>
            <br />
            <span class="heading-font-size">Pune - 411008, India</span>
            <br />
            <span class="heading-font-size">(EPABX:+91(0)20-25902905, 25908901; Fax:+91(0)20-29902660)</span>
        </div>
        <div class="clearfix"></div>
        <div class="text-center mt-3 mb-3">
            <br />
            <span class="heading-font-size"><u>REQUEST FOR HOUSE ACCOMMODATION</u></span>
            <br />
        </div>
    </div>
</div>
<button type="button" class="btn btn-primary" onclick="printDiv()">Print</button>


Answers (4)