bd:get-id

Purpose

Returns the value of the id attribute of an element. If the element is not specified or the specified element has no id attribute, then this function generates an identifier that is unique within the page. Note that if the element is not provided, then the function returns a different value each time it is called.

Signature

bd:get-id(element?)

Parameter

Name Description Type Use
element The element whose id is to be retrieved. element() optional 

Example

Please see the topic entitled Creating a reusable component for a concrete example.

Related topics