js object

HTMLElement Object

The following properties, and methods can be used on all HTML elements.

Note: All elements can also use the properties/methods of the Node object and the Element object.


Properties

Property Description W3C
accessKey Sets or returns an accesskey for an element Yes
className Sets or returns the class attribute of an element Yes
clientHeight Returns the viewable height of the content on a page (not including borders, margins, or scrollbars) No
clientWidth Returns the viewable width of the content on a page (not including borders, margins, or scrollbars) No
dir Sets or returns the text direction of an element Yes
id Sets or returns the id of an element Yes
innerHTML Sets or returns the HTML contents (+text) of an element Yes
lang Sets or returns the language code for an element Yes
offsetHeight Returns the height of an element, including borders and padding if any, but not margins No
offsetLeft Returns the horizontal offset position of the current element relative to its offset container No
offsetParent Returns the offset container of an element No
offsetTop Returns the vertical offset position of the current element relative to its offset container No
offsetWidth Returns the width of an element, including borders and padding if any, but not margins No
scrollHeight Returns the entire height of an element (including areas hidden with scrollbars) No
scrollLeft Returns the distance between the actual left edge of an element and its left edge currently in view No
scrollTop Returns the distance between the actual top edge of an element and its top edge currently in view No
scrollWidth Returns the entire width of an element (including areas hidden with scrollbars) No
style Sets or returns the style attribute of an element Yes
tabIndex Sets or returns the tab order of an element Yes
title Sets or returns the title attribute of an element Yes
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值