To toggle the print preview on all browsers you can make use of the "print()" method available to the "window" global object.
Toggle Print Preview using JavaScript
window.print()
You can bind this to a button onclick method and right away after the button is pressed, the print preview of each respective browser will be shown to the user.
Print Preview on Firefox
Leave a reply