The name of the element(s) to find.
(optional) One or more additional names of the element(s) to find. Separate each name with a comma.
Get a pointer to elements in the DOM by name.
The $n() function gets elements in the HTML. It takes an arbitrary number of arguments, each a string with the eleName of the element you wish to get a pointer to.
If an element with the eleName specified does not exist, the function will automatically look for an element that has a ID of the passed in string, and return it.
/*Assume that you have two radio buttons with choices 'Male' and 'Female'. Each radio button has a unique ID, but they both have the same NAME, 'gender' */ var genderInputs = $n('gender'); /*Select the first radio button in the group*/ genderInputs.checked = true;