Edit this page

up.element up.element.numberAttr(element, attribute)
JavaScript function

Returns the value of the given attribute on the given element, cast to a number.

If the attribute value cannot be cast to a number, undefined is returned.


Parameters

element Element

The element from which to retrieve the attribute value.

attribute string

The attribute name.

Return value

numberorundefined

The cast attribute value.