Leakbali
w3 Tutorial, Web Tutorial
Switch to English Bahasa Indonesia 
Register   Login

Javascript - Print


The JavaScript print function performs the same operation as the print option that you see at the top of your browser window or in your browser's "File" menu. The JavaScript print function will send the contents of the webpage to the user's printer.

Many believe this function to be worthless, but there are many computer users who do not know their way around a computer well, and helpful features such as this function can somtimes create a more user-friendly environment.

window.print()

The JavaScript print function window.print() will print the current webpage when executed. In this example script, we will be placing the function on a JavaScript button that will perform the print operation when the onClick event occurs.
<form>
<input type="button" value="Print This Page" onClick="window.print()" />
</form>

Display

If you click this button you should be prompted with whatever application your computer uses to handle its print functionality.

References

About Us

Home
About Us
Contact Us
Sitemap

Tools

Google PageRank
Alexa Rank
Keywords Density

Accounts

Register Account
Login
Valid XHTML 1.0 TransitionalValid CSS!
Web Directory


2006 - 2012 © Leakbali.com - Free Web Tutorial, Free Web Articles, Web Sharing, Source Codes, Web References