Frame.print()

JavaScript 1.2+, JScript 1.0+ Nav4+, IE 3+ Syntax

							frame.print(options)

Description

The print method of the Frame object is used to send the document output of a particular frame to a printer. This works the same as executing the Print command from a browser menu.

Example

Listing 7.282 shows an example of the print method. Using the onClick event handler, when the bottom frame is clicked, the print() method is executed.

Listing 7.282 Example of print() Method
<html>
<title> Example of print method of the Frame object</title>

<frameset rows="80, *">
<frame src=top.html name=top >
<frame src=bottom.html name=bottom onClick='document.window.bottom.print()'>
</frameset>

</html>
							
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.