The print() method prints the contents of the current window.
Syntax: window.print();
JavaScript code:
<script language="javascript" type="text/javascript">
function printFunction() {
window.print();
}
</script>
HTML Code:
<input type="button" value="Click to Print!" onclick="this.printFunction();" />
No comments:
Post a Comment