If you would like to print your HTML page contents using your printer, here is a one line javascript:
<a>href="" onclick="window.print();return false;" ><img src="../images/print.gif" border="0" alt="Print" /></a>
Code Explain:
<a href=”” : This is for the mouse hand to appear when mouse hover over print icon.
onclick=”” : event handler works when you click on the print icon.
window.print() : a javascript command that calls windows print screen.
return false; : so that after you print it will not come back and seach for the no page in href=””
: print image tag.
border=”0″ : to delete border, otherwise a border will appear.
src=”../images/print.gif” : the path for print icon.
../ : means go back one step.