offsetParent 속성으로 지정한 개체의 모체 배치 좌표에 상대적인 계산된 너비를 반환한다.

Script[iVal=]object.offsetWidth
HTML없음
인수
iVal : (속성 정수값)
offsetWidth 속성값은 offsetParent 속성으로 지정한 개체의 모체 배치 좌표에 상대적인 계산된 너비를 픽셀단위로 나타내는 정수값이다.

이 속성은 읽기전용이며 디폴트값은 없다.

특기

offsetLeft, offsetTop, offsetHeightoffsetWidth 속성들의 조합으로 개체의 위치, 너비, 높이를 알 수 있다. 정수값들은 모체에 대한 상대적인 오프세트로 물리적인 위치와 크기를 반환한다.

CSS1(Cascading Style Sheets, Level 1) box 모델에 부합하기 위하여, 문서를 표준에 부합하게 하기 위한 !doctype 선언을 사용한 경우 IE6이후에서는 개체의 너비를 다른 방식으로 계산한다. 이 차이는 offsetWidth 속성값에 영향을 줄 수 있다.
표준 부합 모드를 설정하면, width 속성은 개체를 포함하고 있는 연결된 박스의 왼쪽과 오른쪽 테두리 사이의 거리를 나타낸다.
표준 부합 모드가 설정되지 않았거나 Explorer 이전 버전에서는, width 속성은 개체 주위의 연결된 박스의 borderpadding 부분을 포함한다.

적용
개체scriptHTML규격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

clientHeight clientWidth clientLeft clientTop

boundingHeight boundingWidth boundingLeft boundingTop


property
offsetWidth 속성
offsetWidth</b> 속성이전페이지로페이지 맨위로페이지 맨아래로
property
offsetWidth 속성
견본
이전페이지로페이지 맨위로
최종 수정:
05/01/2025 00:46:17
KoXo Homepage
All right reserved
비정상적인 방식으로 프레임없이 페이지에 접속하면 자주 오류가 발생됩니다.
오류가 나면 정상적 접속으로 시도해 보세요.
http://koxo.com/lang/js/property/offsetWidth.html