Document Object properties:

  • body
  • body.offsetWidth, body.offsetHeight
  • compatMode
  • document.documentMode  IE8 only property
  • doctype
  • documentElement
  • domain
  • implementation
  • ownerDocument
  • readyState     IE property. Supported in Opera 9+, Chrome, and FF 3.6+ as well.
  • styleSheets[]
  • title
  • URL

more info see: DOM Document Object properties

DOM Element properties
  • attributes[]
  • childNodes[]
  • className
  • clientWidth (A cross browser (NS7+, IE4+) property that returns the viewable width of the content on the page, not including borders, margins, or scrollbars (overflowing content).)
  • clientHeight
  • dir  (Read/write property that returns the text direction of the element. Valid values are "ltr" (left to right) and "rtl" (right to left). Default is "ltr.")
  • firstChild
  • id
  • innerHTML
  • lang
  • lastChild
  • localName
  • namespaceURI
  • nextSibling
  • nodeName
  • nodeType
  • nodeValue
  • offsetLeft
  • offsetTop
  • offsetParent
  • offsetWidth (A cross browser (non W3C DOM) property that returns the width of the element, including borders and padding if any, but not margins. In IE6, if a valid doctype is not specified, margins/padding are NOT included in the returned value.)
  • offsetHeight
  • ownerDocument
  • parentNode
  • prefix
  • previousSibling
  • scrollLeft (A cross browser (NS7+, IE4+) property that returns the distance between the actual left edge of the element and its left edge currently in view. In a horizontally scrollable DIV for example, as you drag the scrollbar to the right, the DIV's scrollLeft property increases as the distance between its actual left edge and visible left edge increases. Applicable to scrollable elements, such as a DIV with scrollbars, a textarea, the BODY etc.)
  • scrollTop
  • scrollHeight  (A cross browser (NS7+, IE4+) property that returns the entire height of an element, including any area that may be hidden due to scrollbars. When the element does not contain vertical scrollbars, its scrollHeight is equal to its clientHeight.)
  • scrollWidth
  • style
  • tabIndex
  • tagName
  • title

  more info see: http://www.javascriptkit.com/domref/elementproperties.shtml

 

BTW: <script language="type/javascript"> The part in red is purely optional, as the browser by default assumes a <script> tag to be JavaScript, though you should include it nevertheless for validation reasons.

posted on 2010-01-24 11:37  rabbler  阅读(245)  评论(0编辑  收藏  举报