So on a specific page I have some number of form elements, anywhere between 3 and 8, depending upon the user and their action on the page.

How can I add a specific onblur event to all of the form elements dynamically on the page?

If I have:

function doThisOnBlur() { stuff }

How can I add that same function to all of these once the page loads. No elements are created after the page loads but different elements may appear for different users.

<input type="text" id="x">
<input type="text" id="y">
<select id="z">...</select>

Is that possible?

Edit
Report