Edit This Code:
<!DOCTYPE html>
<html>
<head>
<script>
function printPage() {
    window.print();
}
</script>
</head>
<body>

<input type="button" value="Print this page" onclick="printPage()" />

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy