ux getElement

Description

Search an element by ID or Name

Parameters

string

The element ID or name

Return


The element if it is found or null

Example


<input id="getElement-exampleID" name="getElement-exampleName">
<input type="button" value="Example 1" onclick="ux.getElement('getElement-exampleID').value = 'By ID';">
<input type="button" value="Example 2" onclick="ux.getElement('getElement-exampleName').value = 'By Name';">

 

Preview:

In the preview of the example you can see the result of the string:

UX_getElement_preview