Node Types
- Element_node
- Attribute_node
- Text_node
- Cdata_section_node
- Entity_reference_node
- Entity_node
- Processing_Instruction_node
- Comment_node
- Document_node
- Document_type_node
- Document_fragment_node
- Notation_node
Node Relationships
- childNodes - a NodeList ordered by position / index.
- firstChild
- lastChild
- nth-child
- parentNode
- nextSibling or previousSibling
- Ancestors or Descendants
Window Objects and Its Children (DOM as a tree)
- Window
- Self
- Document
- html
- head
- title
- body
- p -> innerText
- p -> LinkText -> a -> www/URL
- Navigator
- Screen
- Forms
- History
- Location
Window Object Methods and Properties
- Methods
- addEventListener()
- attachEvent()
- blur()
- focus()
- close()
- detachEvent()
- removeEventListener()
- open()
- print()
- Moving and Resizing
- moveBy()
- moveTo()
- resizeBy()
- resizeTo()
- Timers
- clearInterval()
- clearTimeout()
- setInterval()
- setTmeout()
- Get Information of the Screen
- availHeight
- availWidth
- colorDepth
- height
- width
- Properties
- closed
- defaultStatus
- name
- opener
- parent
- status
- top
Example
alert ("Available Height: " + screen.availHeight); alert ("Total Height: " + screen.height); alert ("Available Width: " + screen.availWidth); alert ("Total Width: " + screen.width); // navigator object var body = document.getElementsByTagName ("body")[0]; for (var prop in navigator) { var elem = document.createElement("p"); var text = document.createTextNode (prop + ": " + navigator[prop]); elem.appendChild(text); body.appendChild(elem); }
No comments:
Post a Comment