Single value for a CSS style.
Platform Support
| IE | Mozilla | Netscape | Opera | Safari | Chrome | no | 1.0+ | no | 9.0+ | 1.0+ | no |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome | ||
|---|---|---|---|---|---|---|---|---|---|
|
CSSPrimitiveValue Constructor() : CSSPrimitiveValue
Single value for a CSS style.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no | ||
CSSPrimitiveValue() : CSSPrimitiveValueSingle value for a CSS style. Returns
|
|||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome |
|---|---|---|---|---|---|---|---|
|
primitiveType
: Number
Holds the value of a constant. See Remarks for possible values.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | no |
|
|||||||
Functions
| Method | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
getCounterValue() : Counter
Returns the counter object that represents the value of a CSS counter.
|
Show Details | no | 1.0+ | no | no | no | no | ||||||||
|
Returns
|
|||||||||||||||
|
getFloatValue(Number unitType) : Number
The value of a number, converted to the appropriate units, if applicable.
|
Show Details | no | 1.0+ | no | no | no | no | ||||||||
|
Parameters
Returns
|
|||||||||||||||
|
getRectValue() : Rect
Returns a Rect object representing the value of a CSS_RECT.
|
Show Details | no | 1.0+ | no | no | no | no | ||||||||
|
Returns
|
|||||||||||||||
|
getRGBColorValue() : RGBColor
Returns a RGBColor object representing the value of a CSS_RGBCOLOR.
|
Show Details | no | 1.0+ | no | no | no | no | ||||||||
|
Returns
|
|||||||||||||||
|
getStringValue() : String
Returns the value of a string.
|
Show Details | no | 1.0+ | no | no | no | no | ||||||||
|
Returns
|
|||||||||||||||
|
setFloatValue(Number unitType, Number floatValue) : void
Sets the value of a number to the specified value for the specified units.
|
Show Details | no | 1.0+ | no | no | no | no | ||||||||
|
Parameters
Returns
|
|||||||||||||||
|
setStringValue(Number stringType, String stringValue) : void
Sets a string to the specified value and type.
|
Show Details | no | 1.0+ | no | no | no | no | ||||||||
|
Parameters
Returns
|
|||||||||||||||
References
Counter|CSSValue|CSSValueList|Rect|RGBColor
Availability
HTML DOM Level 2|W3C