html

HTML form

Retrieving values from a web page

There are two main ways of getting information about the elements on a webpage. These are

  • document.getElementById('element');
  • document.getElementsByTagName('tagName');

The method getElementsByTagName('tagName'), gets a list of all child elements attached to the nodes with the specified tag name. It may appear to be an array, by it is actually an DOM NodeList object.

Syndicate content