Printing using JavaScript

In this snippet, you will learn how to print the content using JavaScript

 

<html>
<head>
<script language = "javascript">
function Toprint() {
Window.Print();
}
</script>
</head>
<body>
<input type = "button" onClick = "Toprint()"
value = "Print">
</body>
</html>

Leave a Comment