Window print() method

Definition and usage

print() Method prints the content of the current window.

print() Method opens the print dialog and allows the user to set preferred print options.

Call print() The behavior caused by the method is like the user clicking the print button in the browser. Usually, this will produce a dialog box that allows the user to cancel or customize the print request.

Instance

Print current page:

window.print();

Prøv det selv

Syntaks

window.print()

Parameter

Ingen.

Tekniske detaljer

Returværdi

:

Ingen.

Browserversioner

Alle browsere understøtter print():

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Støtte Støtte Støtte Støtte Støtte Støtte