Advertisement
Guest User

Jquery Print

a guest
Jan 29th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.31 KB | None | 0 0
  1.  
  2. $('#print_btn').click(function printData()
  3. {  
  4. w=window.open();
  5. w.document.write($('#printblock').html());
  6. w.print();
  7. w.close();
  8.  
  9. return false;
  10. });
  11.  
  12. <input id = "print_btn" class = "btn btn-success" type="button" value="Print Invoice"/>
  13.  
  14. <div id="printblock" style="display:none;">
  15. Hello
  16. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement