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
required

The element from which to retrieve the attribute value.

attribute
required

The attribute name.

string

Return value

The cast attribute value.

numberundefined