CD-567Appendix F . Examples from Parts III and (Web design conference)

CD-567Appendix F . Examples from Parts III and IV Example Use The Evaluator (Chapter 13) to replace the style rules in one blast via the cssText property. Begin by examining the value returned from the property for the initially disabled style sheet by entering the following statement into the top text box: document.styleSheets[0].cssText Next, enable the style sheet so that its rules are applied to the document: document.styleSheets[0].disabled = false Finally, enter the following statement into the top text box to overwrite the style sheet with entirely new rules. document.styleSheets[0].cssText = P {color:red} Reload the page after you are finished to restore the original state. disabled NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Example Use The Evaluator (Chapter 13) to toggle between the enabled and disabled state of the first styleSheet object on the page. Enter the following statement into the top text box: document.styleSheets[0].disabled = (!document.styleSheets[0].disabled) The inclusion of the NOT operator (!) forces the state to change from true to false or false to true with each click of the Evaluate button. ownerNode NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility styleSheetObject.ownerNode
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Leave a Reply