offsetParent 속성으로 지정한 개체의 모체 배치 좌표에 상대적인 계산된 너비를 반환한다.
![]() | Script | [iVal=]object.offsetWidth |
HTML | 없음 |
이 속성은 읽기전용이며 디폴트값은 없다.
offsetLeft, offsetTop, offsetHeight와 offsetWidth 속성들의 조합으로 개체의 위치, 너비, 높이를 알 수 있다. 정수값들은 모체에 대한 상대적인 오프세트로 물리적인 위치와 크기를 반환한다.
CSS1(Cascading Style Sheets, Level 1) box 모델에 부합하기 위하여, 문서를 표준에 부합하게 하기 위한 !doctype 선언을 사용한 경우 IE6이후에서는 개체의 너비를 다른 방식으로 계산한다.
이 차이는 offsetWidth 속성값에 영향을 줄 수 있다.
표준 부합 모드를 설정하면, width 속성은 개체를 포함하고 있는 연결된 박스의 왼쪽과 오른쪽 테두리 사이의 거리를 나타낸다.
표준 부합 모드가 설정되지 않았거나 Explorer 이전 버전에서는, width 속성은 개체 주위의 연결된 박스의 border와 padding 부분을 포함한다.
개체 | script | HTML | 규격 | IE |
---|---|---|---|---|
a | [iVal=]a.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
acronym | [iVal=]acronym.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
address | [iVal=]address.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
applet | [iVal=]applet.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
area | [iVal=]area.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
b | [iVal=]b.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
bdo | [iVal=]bdo.offsetWidth | 없음 | 없음 | IE5(win16,win32,unix,mac) |
big | [iVal=]big.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
blockQuote | [iVal=]blockQuote.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
body | [iVal=]body.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
br | [iVal=]br.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
button | [iVal=]button.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
caption | [iVal=]caption.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
center | [iVal=]center.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
cite | [iVal=]cite.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
code | [iVal=]code.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
col | [iVal=]col.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
colGroup | [iVal=]colGroup.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
custom | [iVal=]custom.offsetWidth | 없음 | 없음 | IE5(win32,unix) |
dd | [iVal=]dd.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
del | [iVal=]del.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
dfn | [iVal=]dfn.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
dir | [iVal=]dir.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
div | [iVal=]div.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
dl | [iVal=]dl.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
dt | [iVal=]dt.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
em | [iVal=]em.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
embed | [iVal=]embed.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
fieldSet | [iVal=]fieldSet.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
font | [iVal=]font.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
form | [iVal=]form.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
frame | [iVal=]frame.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
hn | [iVal=]hn.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
hr | [iVal=]hr.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
i | [iVal=]i.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
iFrame | [iVal=]iFrame.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
img | [iVal=]img.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
button | [iVal=]button.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
checkbox | [iVal=]checkbox.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
FileUpload | [iVal=]FileUpload.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
image | [iVal=]image.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
password | [iVal=]password.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
radio | [iVal=]radio.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
reset | [iVal=]reset.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
submit | [iVal=]submit.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
text | [iVal=]text.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
ins | [iVal=]ins.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
kbd | [iVal=]kbd.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
label | [iVal=]label.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
legend | [iVal=]legend.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
li | [iVal=]li.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
listing | [iVal=]listing.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
map | [iVal=]map.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
marquee | [iVal=]marquee.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
menu | [iVal=]menu.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
noBR | [iVal=]noBR.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
Object | [iVal=]Object.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
ol | [iVal=]ol.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
Option | [iVal=]Option.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
p | [iVal=]p.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
plainText | [iVal=]plainText.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
pre | [iVal=]pre.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
q | [iVal=]q.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
rt | [iVal=]rt.offsetWidth | 없음 | 없음 | IE5(win16,win32,unix,mac) |
ruby | [iVal=]ruby.offsetWidth | 없음 | 없음 | IE5(win16,win32,unix,mac) |
s | [iVal=]s.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
samp | [iVal=]samp.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
select | [iVal=]select.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
small | [iVal=]small.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
span | [iVal=]span.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
strike | [iVal=]strike.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
strong | [iVal=]strong.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
sub | [iVal=]sub.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
sup | [iVal=]sup.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
table | [iVal=]table.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
tBody | [iVal=]tBody.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
td | [iVal=]td.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
textArea | [iVal=]textArea.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
tFoot | [iVal=]tFoot.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
th | [iVal=]th.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
tHead | [iVal=]tHead.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
tr | [iVal=]tr.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
tt | [iVal=]tt.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
u | [iVal=]u.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
ul | [iVal=]ul.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
var | [iVal=]var.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
xmp | [iVal=]xmp.offsetWidth | 없음 | 없음 | IE4.0(win16,win32,ce,unix,mac) |
offsetHeight offsetWidth offsetLeft offsetTop offsetParent
![]() | offsetWidth 속성⇒ | ![]() | ![]() ![]() ![]() |
![]() | offsetWidth 속성 | ⇒ | ![]() ![]() |
최종 수정: 05/01/2025 00:46:17 | ![]() All right reserved | 비정상적인 방식으로 프레임없이 페이지에 접속하면 자주 오류가 발생됩니다. 오류가 나면 정상적 접속으로 시도해 보세요. | http://koxo.com/lang/js/property/offsetWidth.html |