|
|
Print a Web Page Using JavaScript - Javascript
|
Views : 523
|
|
Tagged in : Javascript
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Print a Web Page Using JavaScript
To print your webpage using javascript use window.print(). It will print your webpage.
Here's the code:
<a href="javascript:window.print()">Print This Page</a>
Result:
Print This Page
You can set it to print off of an image:
<a href="javascript:window.print()">
<IMG SRC="print.gif" border="0"</a>
You can set it to trigger off a button:
<form>
<inout type="button" onClick="window.print()">
</form>
|
|
By Sanju, On - 2010-02-02 |
|
|
|