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 type="text/javascript">
function printpage()
{
window.print()
}
</script>
</head>
<body>
<input type="button" value="Print this page"
onclick="printpage()" />
</body>
</html>
|
Try it yourself »
|
Window Object
|