About This Product
FontsMadeEasy.com
 
Search This Database:
| Over 5000 Free Fonts | Tutorials | Javascript Forum | Other Javascript Resources | Cheat Sheet
Tutorial archive
General Questions
Javascript 1.2
Navigation
Numbers
Strings
Object Model
Reference Manual
Dialog
Windows
Frames
Forms
Images
Mouse Events
Colors
File Access
Control Status Bar
Dates and Time
Cookies
Client Information
Bookmarklets


Printing JavaScript Output

Question: How do I print JavaScript output?

Answer: JavaScript programs cannot directly access printers. However, the user can print out everything on the Web page, including the output of JavaScript programs, by using the File | Print menu of the browser (or the keyboard shortcut, e.g. Ctrl+P on Windows systems).

If your script outputs data that users would often print out, then just remind them to use the File | Print menu. Also, your script might generate the printable data in a separate browser window (see example below).

Example. This script generates the multiplication table, writes it to a new browser window and explains to the user how to print it.

BackBack