/ LJCJSCodeDoc / LJCCommonLib / LJC / Element


Parameters
elementID - The element ID name.

Returns

The HTML element.

Syntax

JavaScript
static Element(elementID)

Gets the HTMLElement by ID.

Example

JavaScript
// Gets the HTMLElement by ID.
Element()
{
  const elementID = "testDiv";
  const element = LJC.Element(elementID);

  let result = element.tagName;
  // result:
  // "DIV";

  result = element.id;
  // result:
  // "testDiv";
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.