Content
Classified in Computers
Written at on English with a size of 9.51 KB.
The document.GetElementById() method returns the DOM node whose id attribute is the same as the method's parameter.
Ex:document.GetElementById("early_languages")
returns the p node in the HTML below.The document.GetElementsByTagName() method returns an array containing all the DOM nodes whose type is the same as the method's parameter.
Ex:document.GetElementsByTagName("li")
returns a list of the four li nodes from in the HTML below.The document.GetElementsByClassName() method returns an array containing all the DOM nodes whose class attribute matches the method's parameter.
Ex:document.GetElementsByClassName("traditional")
returns an array containing theol
node with the class attribute matching the word traditional.