How to Print Table Content in Document Using jQuery?
Can you take a look at
this Demo
and let me know how I can use jQuery to Print only the table of the document?
-
- <!--panel-->
- <div class="panel panel-primary">
- <!-- Default panel contents -->
- <div class="panel-heading">New Order
- <button class="btn btn-sm pull-right btn-default" type="submit">Print Item</button>
- </div>
-
- <div class="panel-body">
- <!--table-->
- <table class="table table-condensed">
- <thead>
- <tr>
- <th>#</th>
- <th>First Name</th>
- <th>Last Name</th>
- <th>Username</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>1</td>
- <td>Mark</td>
- <td>Otto</td>
- <td>@mdo</td>
- </tr>
- <tr>
- <td>2</td>
- <td>Jacob</td>
- <td>Thornton</td>
- <td>@fat</td>
- </tr>
- <tr>
- <td>3</td>
- <td colspan="2">Larry the Bird</td>
- <td>@twitter</td>
- </tr>
- </tbody>
- </table>
- <!--end of table-->
- </div>
- </div>
- <!--end of panel-->
Thanks,