Tuesday, July 31, 2012

javascript – Why does it print only one time? Please give me solution




<html>
<head>
<script type=\"text/javascript\">
function printpage()
{document. getElementById (\'print\').style.display=\'none\';
window.print()
}
</script>
</head>
<body>
<td align=\"center\">
<input name=\"print\" type=\"submit\" id=\"print\" value=\"PRINT\" onclick=\"printpage()\" />
</td>
</body>
</html>


When I click, it will open a print window.

Once I close print window and open it again and then click on print, without reloading, then it will not work.






Rating: 3 out of 5 based on 3 ratings



The post javascript – Why does it print only one time? Please give me solution appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/javascript-why-does-it-print-only-one-time-please-give-me-solution.html

No comments:

Post a Comment