You are here: irt.org | FAQ | JavaScript | Print | Q506 [ previous next ]
Edward E. Hacker writes:
Internet Explorer supports a Style to force a page break on printing. I have seen this work using the DIV tags. For example:
<div style="page-break-before:always"> stuff on a new page </div>
The following was submitted by Deepak Borule
Yes and No. Yes we can but it is IE specific and cannot be used with Netscape. We can do with style tag and a recognition point from which the page should break.
<html> <head> <title>Sample Printing</title> <style>P.page{page-break-after: always}</style> </head> <body> <p class=page> this is a page printing sample.after the end of this p tag printing will start from next page. </p> <p class=page> See it will print the data from next page. Here we will give a button using that button we will print this document. <br> <input type=button name=printit value='Print Me' onClick='print();'> </p> </body> </html>