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

jQuery clickable div with working mailto link inside -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -