javascript - Using window.print() to print a different stylesheet without restyling the page? -
i have print button on page run window.print(), prints page exactly. there way pass parameter function print page stylesheet print.css rather style.css, without necessitating page refresh?
in css put print specific css rules
@media print{ }
and css rules displaying into
@media screen, projection, tv{ }
html this
<link href="default.css" rel="stylesheet" type="text/css" media="all" /> <link href="print.css" rel="stylesheet" type="text/css" media="print" />
Comments
Post a Comment