print Method

DHTML, HTML, & CSS

 
Click to return to the DHTML, HTML & CSS home page    
previousPage method     prompt Method     DHTML Methods    

print Method


Prints the document associated with the window.

Syntax

window.print()

Return Value

No return value.

Remarks

Calling the print method has the same effect as choosing Print from the Microsoft® Internet Explorer File menu. The print method activates the Print dialog box, prompting the user to change print settings. When the user clicks the OK button, the following sequence of events occurs:

  1. The onbeforeprint event fires.
  2. The document prints.
  3. The onafterprint event fires.

The onbeforeprint and onafterprint events are particularly useful when not all the information on the page is visible at all times. Use the onbeforeprint to modify the document to make all the information on the page visible for printing. To return the document to its original state, use the onafterprint event.

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
window

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.