Javascript print() function

Javascript window.print() used to take print the current web page.When the user click ‘Print’ button the user will get the print window.

Code:

<head>
<script language="javascript">
function takeprint()
{
window.print();
}
</sctipt>
</head>
<body>
<input type="button" name="print" value="Print" onClick="javascript:return takeprint();">
</body>

Demo:

Posted in Javascript