Put your text ad here
WestNIC provides reliable web hosting services
This FAQ answers one of over 700 Web development questions submitted by Code Style readers. Sign-up to our premium content service to view the full answer.
A: Javascript has practically no print configuration options, so it is not possible to control whether the page background is printed or not. If you want to prevent the page background from being printed you can use a media dependent style sheet to set a plain background colour and override any background images that have been set.
Print media style sheets are attached using stylesheet link elements in the head of an HTML document with a media="print" attribute, as below.
… premium content omitted
Access all premium content for $50: sign-up below.
Can we edit the print background property with Javascript?
Come inside, access hundreds of premium content answers. One payment grants life membership to hundreds of developer FAQs.
The PayPal service allows you to pay securely and independently in your own currency. Payments are billed to Metacentric Internet Limited. We never handle your credit card details.
Direct access to hundreds of answers to common Web development questions with full working examples and links to other Web resources. Your subscription provides full answers to all premium content questions including those listed below, plus:
onclick event on my button is not working! (stub article)
iframe browser and filter the URLs? (stub article)