Window print() Method
Window Object
Definition and Usage
The print() method prints the contents of the current window.
Syntax
Browser Support

The print() method is supported in all major browsers.
Example
Example
Print the current page:
<html>
<head>
<script>
function printpage()
{
window.print()
}
</script>
</head>
<body>
<input type="button" value="Print this page"
onclick="printpage()">
</body>
</html>
Try it yourself »
Window Object
Thank You For Helping Us!
Your message has been sent to W3Schools.
Close [X]