ZVON > References > DOM2 Reference

setFloatValue (method )

Owning interface and usage:  
CSSPrimitiveValue.setFloatValue(unitType, floatValue)

Member of these other interfaces:  
none

Description:  
A method to set the float value with a specified unit. If the property attached with this value can not accept the specified unit or the float value, the value will be unchanged and a DOMException will be raised.

Parameters:  
unsigned unitType  -  A unit code as defined above. The unit code can only be a float unit type (i.e. CSS_NUMBER, CSS_PERCENTAGE, CSS_EMS, CSS_EXS, CSS_PX, CSS_CM, CSS_MM, CSS_IN, CSS_PT, CSS_PC, CSS_DEG, CSS_RAD, CSS_GRAD, CSS_MS, CSS_S, CSS_HZ, CSS_KHZ, CSS_DIMENSION).
float floatValue  -  The new float value.

Returns:  
nothing

Exceptions:  
DOMException INVALID_ACCESS_ERR
Raised if the attached property doesn't support the float value or the unit type.
DOMException NO_MODIFICATION_ALLOWED_ERR
Raised if this property is readonly.