DOM Document Object properties & DOM Element properties
2010-01-24 11:37
267 查看
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.
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.
相关文章推荐
- javascript里Dom问题之document.getElementById('xx').innerHTML
- Apple 移动设备绑定动态生成元素点击事件$(document).on('click',element,callback)失效解决方法
- WebService org.xml.sax.SAXParseException: Document root element "beans",must match DOCTYPE root "nul
- document.getElementById("id") is null 错误解决
- Document root element "beans", must match DOCTYPE root "null".的错误提示
- javascript在html中的加载顺序------为什么window.alert(document.getElementById("time").innerTex)无法弹出对话框
- document.documentElement && document.documentElement.scrollTop
- Document root element "form-validation", must match DOCTYPE root "null"
- jQuery Object and DOM Element
- HTML DOM Document Object
- jQuery操作DOM(Document、Object、Model)对象——页面元素操作
- Document root element "hibernate-mapping", must match DOCTYPE root "hibernate-configuration
- document.getElementById("billNo")的作用
- ASP.NET 创建母版页导致js出现“ 'document.getElementById(...)' 为空或不是对象”错误
- document.createElement('script')… adding two scripts with one callback
- DOM (文档对象模型(Document Object Model))
- DOM Document Node Element Attr 的联系与区别汇总
- 如何让ActiveXObject( "Microsoft.XmlDom ")对象在非IE浏览器下显示数据?firefox(火狐)
- Server.CreateObject("Msxml2.DOMDocument") 不支持如何解决
- org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".