There are three keys on the keyboard that can be used to modify what your mouse events do.
Disabling the Default Action
Print Directly to Printer
Mouse Cursor Position
Determine the position of the mouse cursor within the web page when an event is triggered.
setTimeout or setInterval
What exactly is the difference between setTimeout and setInterval?
Add a button or link to your page to make it easier for your visitors to print the page. A simple addition to your stylesheets can even set things up so that only selected parts of your page are actually printed.
The onload global event handler is an alternative to placing the onload attribute in the body tag. Here is how you change your code to use it.