This example uses the HTML DOM to assign an "onbeforeprint" event to a body element.
Tip: Keyboard shortcuts, such as Ctrl+P sets the page to print.
Note: The onbeforeprint event is only supported in Internet Explorer and Firefox.