DOM - getElementById
Menu DOM - getElementById
 

DOM - getElementById

This is a method that I use extensively in my manipulation of the DOM

The text in the header and menu options are assigned when my pages load.

The Syntax used to set the header text:

  document.getElementById("htext").innerHTML = "Experiments with the Document Object Model";
Top

My usage of getElementById

I used this to design and develop my shim links. The text on the pop-ups and the links are set from a calling function that "gets" the id of the element and then sets the value.

It is also used to set banner text on mobile pages.

Links

Top

References: - a note on these

  • HTML DOM getElementById() Method -
  • HTML DOM getElementsByTagName() Method - https:// www.w3schools.com/jsref/ met_document_getelementsbytagname .asp

Site design by Tempusfugit Web Design -