Jacques said:
I did a javascript to create a dynamic table. I used window.print()
to print the whole page. But I would prefer to print only the table,
how can I do that?
Use a special CSS file, say print.css, with these contents:
body {color: black; background-color: white ; background-image: url("");}
..hidden {visibility: hidden ;}
Actually the body spec can be anything, but I use this to remove any
backgrounds.
Link to it in the <head> section by:
<link rel="stylesheet" type="text/css" media="print" href="print.css" />
Place everything *except* the table in a <div> (or <div>'s)
<div class="hidden">
Voila !
Only the table will be printed