Javascript Reference
Categories: styleSheet

javascript styleSheet media

@March 15, 2008, 1:22 a.m.
mediaFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  

Read/Write  

Specifies the intended output device for the content governed by the style sheet (reflecting the media attribute of the link and style elements). The media property looks forward to the day when browsers are able to tailor content to specific kinds of devices such as pocket computers, text-to-speech digitizers, or fuzzy television sets. This property is not available in IE 4/Macintosh.

 
Example
 
if (document.styleSheets[2].media == "print") {
    // process for print output
}
 
Value

Any one of the following constant values as a string: all | print | screen.

 
Default

all


Powered by Linode.