runtimeStyle Object Sample

This sample demonstrates the use of the runtimeStyle object. The runtimeStyle object allows authors to use a particular style to override an existing style specified inline or in a style sheet.

In this sample, you can select different values to be set on the runtimeStyle object for the preconfigured properties used for this paragraph. When you select a new value, notice that the values for the runtimeStyle and currentStyle objects change for that property, but the style object does not. When the value is cleared (select 'CLEAR' from the drop-down menu) from the runtimeStyle object, the property value reverts to the style value, and the currentStyle value reflects this.

CSS Property style runtimeStyle currentStyle Select a Value
backgroundColor
borderColor
color