Our volunteers haven't translated this article into Bahasa Indonesia yet. Join us and help get the job done!
You can also read the article in English (US).

Summary

Opens the Print Dialog to print the current document.

Syntax

window.print() 

Notes

Starting with Chrome 46.0 this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.

Specification

Specification Status Comment
HTML Living Standard
The definition of 'print()' in that specification.
Living Standard  

Browser Compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes1 ? Yes ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes ? Yes ? ? ?

1. Starting with Chrome 46.0 this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.

See also