Changes

Jump to: navigation, search

JavaScript and CSS - Dynamic Styles and Layers

299 bytes added, 18:40, 17 May 2007
Making Basic Dynamic Style Changes
</pre>
Having gained access to the element object we can access the ''color'' property of the ''style'' object for this element and change the color:. the following example contains some text contained in a &lt;P&gt; tag assigned the ''id'' introtext. A button is created whiuchj calls the ''buttonPressed()'' function when clicked. the ''buttonPressed()'' functiopnm in turn access the element via the ''id'' and changes the color style to 'green'.
<pre>

Navigation menu