Accessing HTML DOM Nodes from JavaScript
- In JSF page: use the id attribute to give an element a unique
identifier
- In JavaScript function: use window.document to access the
document node
- window is an implicit object representing the browser window
- document is a property of window representing the
root of the DOM tree
- Use window.document.getElementById() to get the element you want
to manipulate