Browser/User Agent Support
| IE | Mozilla | Netscape | Opera | Safari | Netscapte | no | 1.0+ | no | 9.0+ | 1.0+ | no |
|---|
Constructors
| Constructor | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Single value for a CSS style. | no | 1.0+ | no | 9.0+ | 1.0+ | no |
Properties
| Property | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Holds the value of a constant. See Remarks for possible values. | no | 1.0+ | no | 9.0+ | 1.0+ | no |
Methods
| Method | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Returns the counter object that represents the value of a CSS counter. | no | 1.0+ | no | no | no | no |
The value of a number, converted to the appropriate units, if applicable. | no | 1.0+ | no | no | no | no |
Returns a Rect object representing the value of a CSS_RECT. | no | 1.0+ | no | no | no | no |
Returns a RGBColor object representing the value of a CSS_RGBCOLOR. | no | 1.0+ | no | no | no | no |
Returns the value of a string. | no | 1.0+ | no | no | no | no |
Sets the value of a number to the specified value for the specified units. | no | 1.0+ | no | no | no | no |
Sets a string to the specified value and type. | no | 1.0+ | no | no | no | no |
References
Counter | CSSValue | CSSValueList | Rect | RGBColor
Availability
HTML DOM Level 2 | W3C
Constructor Detail
Property Detail
Number primitiveType - read only
Holds the value of a constant. See Remarks for possible values.
- Remarks
-
The following list of constants describes the possible values for primitiveType:
CSS_UNKNOWN = 0- Unrecognized or unparseable value.CSS_NUMBER = 1- Number with no units.CSS_PERCENTAGE = 2- Percentage.CSS_EMS = 3- Relative length in ems.CSS_EXS = 4- Relative length in exs.CSS_PX = 5- Length in pixels.CSS_CM = 6- Absolute length in centimeters.CSS_MM = 7- Absolute length in millimeters.CSS_IN = 8- Absolute length in inches.CSS_PT = 9- Absolute length in points.CSS_PC = 10- Absolute length in picas.CSS_DEG = 11- Angle in degrees.CSS_RAD = 12- Angle in radians.CSS_GRAD = 13- Angle in grads.CSS_MS = 14- Time in milliseconds.CSS_S = 15- Time in seconds.CSS_HZ = 16- Frequency in hertz.CSS_KHZ = 17- Frequency in kilohertz.CSS_DIMENSION = 18- Dimension without units.CSS_STRING = 19- String.CSS_URI = 20- URI.CSS_IDENT = 21- Unique identifier.CSS_ATTR = 22- Attribute function.CSS_COUNTER = 23- Counter.CSS_RECT = 24- Rectangle.CSS_RGBCOLOR = 25- Color (RGB).
- Availability
HTML DOM Level 2 | W3C
Method Detail
getCounterValue() : static Counter
Returns the counter object that represents the value of a CSS counter.
- Availability
HTML DOM Level 2 | W3C
getFloatValue(Number unitType) : Number
The value of a number, converted to the appropriate units, if applicable.
| Number | unitType | Units to convert the value to. |
- Availability
HTML DOM Level 2 | W3C
getRectValue() : static Rect
Returns a Rect object representing the value of a CSS_RECT.
- Availability
HTML DOM Level 2 | W3C
getRGBColorValue() : static RGBColor
Returns a RGBColor object representing the value of a CSS_RGBCOLOR.
- Availability
HTML DOM Level 2 | W3C
getStringValue() : static String
Returns the value of a string.
- Availability
HTML DOM Level 2 | W3C
setFloatValue(Number unitType, Number floatValue) : void
Sets the value of a number to the specified value for the specified units.
| Number | unitType | Units to set the number to. |
| Number | floatValue | Value of the number. |
- Availability
HTML DOM Level 2 | W3C
setStringValue(Number stringType, String stringValue) : void
Sets a string to the specified value and type.
| Number | stringType | Type to set the string to. |
| String | stringValue | Value of the string. |
- Availability
HTML DOM Level 2 | W3C
