윈도우의 위쪽이나 아랫쪽에 보이도록 개체를 스크롤(화면굴림)하게 한다.
![]() | Script | object.scrollIntoView([bAlignToTop]) |
필수적인 요소이며, 스크롤할 개체이다.
true | 디폴트이며, 윈도우의 맨 위에 개체의 제일 위가 보이도록 개체를 스크롤한다. |
false | 윈도우의 맨 아래에 개체의 제일 아래가 보이도록 개체를 스크롤한다. |
반환값은 없다.
scrollIntoView 메서드는, 사용자가 수동으로 결과를 찾아 스크롤하지 않고도, 어떤 작용의 결과를 즉시 사용자에게 보이는데 유용하다.
해당 개체와 현재의 윈도우의 크기에따라 이 메서드는 내용을 최상위나 최하위에 위치시키는 것이 가능하지 않을 수 있으나, 개체를 요청한 위치에 가장 가깝게 위치시킬 것이다.
개체 | script | IE |
---|---|---|
a | a.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
address | address.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
applet | applet.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
area | area.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
b | b.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
big | big.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
blockQuote | blockQuote.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
br | br.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
button | button.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
caption | caption.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
center | center.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
cite | cite.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
code | code.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
col | col.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
colGroup | colGroup.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
comment | comment.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
controlrange | controlrange.scrollIntoView([bAlignToTop]) | IE5(win16,win32,unix,mac |
custom | custom.scrollIntoView([bAlignToTop]) | IE5(win32,unix) |
dd | dd.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
dfn | dfn.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
dir | dir.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
div | div.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
dl | dl.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
dt | dt.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
em | em.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
embed | embed.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
fieldSet | fieldSet.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
font | font.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
form | form.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
hn | hn.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
hr | hr.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
i | i.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
iFrame | iFrame.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
img | img.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
button | button.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
checkbox | checkbox.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
FileUpload | FileUpload.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
image | image.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
password | password.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
radio | radio.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
reset | reset.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
submit | submit.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
text | text.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
kbd | kbd.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
label | label.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
legend | legend.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
li | li.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
listing | listing.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
map | map.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
marquee | marquee.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
menu | menu.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
noBR | noBR.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
Object | Object.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
ol | ol.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
p | p.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
plainText | plainText.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
pre | pre.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
s | s.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
samp | samp.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
select | select.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
small | small.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
span | span.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
strike | strike.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
strong | strong.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
sub | sub.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
sup | sup.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
table | table.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
tBody | tBody.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
td | td.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
textArea | textArea.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
TextRange | TextRange.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
tFoot | tFoot.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
th | th.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
tHead | tHead.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
tr | tr.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
tt | tt.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
u | u.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
ul | ul.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
var | var.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
wbr | wbr.scrollIntoView([bAlignToTop]) | IE5(win16,win32,unix,mac) |
xmp | xmp.scrollIntoView([bAlignToTop]) | IE4.0(win16,win32,ce,unix,mac) |
![]() | scrollIntoView 메서드⇒ | ![]() | ![]() ![]() ![]() |
밑줄친 문단
scrollIntoView 메서드로 문서의 다섯번째 문단을 밑줄긋고, 윈도우에 맨위에 스크롤하여 보이도록 하였다.
<P style="textDecoration:none" id="sampleP">밑줄친 문단</P> <SCRIPT> var coll = document.all.tags('P'); document.write('coll.length='+coll.length+'(예제까지)<BR>'); coll(coll.length-1).style.textDecoration = 'underline'; coll(coll.length-1).scrollIntoView(true); document.write('coll(coll.length-1).id='+coll(coll.length-1).id+'<BR>'); document.write('coll(coll.length-1).style.textDecoration='+coll(coll.length-1).style.textDecoration+'<BR>'); </SCRIPT>
![]() | scrollIntoView 메서드 | ⇒ | ![]() ![]() |
최종 수정: 04/06/2025 02:10:35 | ![]() All right reserved | 비정상적인 방식으로 프레임없이 페이지에 접속하면 자주 오류가 발생됩니다. 오류가 나면 정상적 접속으로 시도해 보세요. | http://koxo.com/lang/js/method/scrollIntoView.html |