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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -