English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Window print() Method

JavaScript Window Object

print()The method opens a print dialog to print the current document.

Syntax:

window.print()
window.print();
Test and See‹/›

Browser Compatibility

All browsers fully support the print() method:

Method
print()YesYesYesYesYes

Technical Details

Return Value:None

Related References

HTML Reference:HTML onafterprint Event Attribute

HTML Reference:HTML onbeforeprint Event Attribute

JavaScript Window Object