Print only the contents of a div


/ Published in: JavaScript
Save to your folder(s)

Although there is not a simple command that allows the printing of part of a document there are a couple of methods that can be used.
You can use CSS by creating a seperate style sheet to hide any content that is not required for printing or you can use a script.
The basic idea is that because the print command prints the whole page you create a new page containing only the text you want to print and print that page.

URL: http://www.huntingground.freeserve.co.uk/main/mainfram.htm?../scripts/printing.htm

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.