惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
C
Check Point Blog
Vercel News
Vercel News
Y
Y Combinator Blog
G
Google Developers Blog
P
Proofpoint News Feed
WordPress大学
WordPress大学
MongoDB | Blog
MongoDB | Blog
博客园 - 司徒正美
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
N
Netflix TechBlog - Medium
L
LangChain Blog
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
博客园_首页
B
Blog RSS Feed
The Cloudflare Blog
MyScale Blog
MyScale Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Security Blog
Microsoft Security Blog

博客园 - rabbler

利用脚本禁止与启动Microsoft SQL Server相关服务 [译]Creating a Stock Widget in ASP.NET MVC Application A-Grade Browser By Yahoo asp.net mvc 2.0 validate model asp.net mvc 2.0 Strongly-Typed HTML Helper Javascript code prettifier YUI3学习路线 Asp.net MVC 常用控件 Ubuntu 常用命令收集[菜鸟版] How to use JabRef (BibTeX) with Microsoft Word SQL Server 2008 sp1 集成安装 - rabbler Web Design: CSS Tutorials Using Asp.net Membership and RoleProvider to Build Login Pages Bart's PE - rabbler - 博客园 Portal课题的相关词汇 计算机核心期刊一览 IE8 Beta2 安装与卸载之旅 水晶报表的使用 如何提高Asp.net2.0的效率
DOM Document Object properties & DOM Element properties
rabbler · 2010-01-24 · via 博客园 - rabbler

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.