No, they are not.
Java (developed by Sun Microsystems) is a powerful and much more complex programming language in the same category as C and C++.
The HTML DOM
The HTML Document Object Model (DOM) is the browser’s view of an HTML page as an object hierarchy, starting with the browser window itself and moving deeper into the page, including all of the elements on the page and their attributes. Below is a simplified version of the HTML DOM.
As shown, the top-level object is
document object is a child of
window and all the objects (i.e, elements or nodes) that appear on the page (e.g, forms, links, images, tables, etc.) are descendants of the
document object. These objects can have children of their own. For example,
form objects generally have several child objects, including textboxes, radio buttons, and select menus.
window). Objects can be referred to by name or id or by their position on the page. For example, if there is a form on the page named “loginform”, using dot notation you could refer to the form as follows:
loginform is the first form on the page, you could also refer to this way:
document can have multiple
form elements as children. The number in the square brackets (
) indicates the specific
form in question. In programming speak, every
form on the page is referenced with the number zero (
0) as shown in the syntax example above.
Square Bracket Notation
Objects can also be referenced using square bracket notation as shown below:
- Open your browser.
- In the location bar, type in
- Press Enter.
- You should get an alert reading “Hello world!”. The