tailieunhanh - JavaScript Bible, Gold Edition part 94
JavaScript Bible, Gold Edition part 94. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | 778 Part III Document Objects Reference client operating system learning the common denominator of style sheet features is the right way to go. Details in this chapter cover all versions so pay close attention to compatibility listings for each item. One last compatibility note While NN4 implements a fair amount of CSS it does not expose style sheets or style rules to the object model. Part of this is linked to the static nature of an NN4 page. Because modifying a style may alter the physical layout of body elements and because that browser does not reflow the page in response to such changes altering styles of content that is already loaded is simply not possible. In NN6 however the page reflows and everything relating to styles is exposed to the scriptable object model. Making Sense of the Object Names The first task in this chapter is to clarify the seemingly overlapping terminology for the style sheet-related objects that you will be scripting. Some objects are more abstract than others but they are all important. The objects in question are STYLE element object styleSheet object a member of the styleSheets array rule or cssRule object a member of the rules or cssRules array style object A STYLE element object is the object that represents the STYLE tag in your document. Most of its properties are inherited from the basic HTML element objects you see detailed in Chapter 15. While the STYLE element object has a disabled property by and large you won t be accessing style sheets via the STYLE element object. A style sheet can be embedded in a document via the STYLE tag or it may be linked in via a LINK tag. One property of the document object the styleSheets property returns an array collection of all styleSheet objects that are currently visible to the document whether or not they are disabled. Even though the STYLE tag for example contains lines of code that make up the rules for a style sheet the STYLE element object is not the path to reach the individual .
đang nạp các trang xem trước