Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Window print() method

Window print() method

Window Object Reference Window Object


Definition and Usage

The print() method is used to print the contents of the current window.

Syntax

window.print()


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the print() method


Example

Example

Print the current page:

function printpage(){

    window.print();

}

Try it »


Window Object Reference Window Object