Below script prints the window page by simple javascript function.
See below : 
Related Articles
How to Do Debugging in Javascript
Below is the way to do debugging in Javascript to get typeof objForm, forms.elements and form value.
How to handle the F11 key without showing Full Screen mode using Javascript
You can handle the F11 key using Javascript function, check the below javascript function.
Javascript Key Codes
Key ==> Code backspace ==> 8 tab ==> 9 enter ==> 13 shift ==> 16 ctrl ==> 17 alt ==> 18 pause/break ==> 19 caps lock ==> 20 escape ==> 27 page up ==> 33 page down ==> 34 end ==> 35 home ==> 36 left arrow ==> 37 up arrow ==> 38 right arrow […]
