Functiondojo.byId

Returns DOM node with matching id attribute or null if not found, similar to "$" function in another library. If id is a DomNode, this function is a no-op.

Usage

function (/*String|DOMNode*/ id, /*Document?*/ doc)
parametertypedescription
idString|DOMNodeA string to match an HTML id attribute or a reference to a DOM Node
docDocumentOptional. Document to work in. Defaults to the current value of dojo.doc. Can be used to retrieve node references from other documents.