C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Print a Web Page


Posted Date: 23 Jun 2008    Resource Type: Code Snippets    Category: Javascript
Author: Kapil DhawanMember Level: Gold    
Rating: Points: 3



The code sample shows a javascript function that executes a simple command window.print()

This print() command is a method of the "window" object. Print commands are often useful when users want to print web pages they want, say, useful articles, tutorials, etc.


function printpage()
{
window.print();
}


The below code is an example on how to put the above command accessible to the user. It shows a button control whose click event calls the function. A more popular usage for this function would be to attach it to a link that says "print".


<input type="button" value="Print this page" onclick="printpage()"&RT;




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Window object's Print method  .  Print a Web Page  .  Javascript command to Print a Web Page  .  Command to Print a Web Page in Javascript  .  Command to Print a Web Page  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Open a new Browser Window using Javascript
Previous Resource: Substring in Java Script
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use