개체의 activeElement 속성이 설정되기 바로 전에 발생된다.


이벤트 속성
object.onbeforeactivate=handler JScript 만-
object.onbeforeactivate=GetRef('handler') VBScript 5.0-
인라인 HTML <ELEMENT onbeforeactivate="handler"> 모든 플랫트폼
명명된 스크립트 <SCRIPT for=object event=onbeforeactivate> Explorer-
이벤트 특성
Bubbles 있슴
취소 가능
발생 원인
  • 문서의 활성(active) 엘레맨트 이외의 다른 엘레멘트에 클릭하였을 때.
  • 활성 엘레멘트에서 다른 엘레맨트로 키보드를 이용하여 초점을 이동 시켰을 때.
  • 현재 활성(active) 엘레맨트 이외의 다른 엘레멘트를 setActive 메서드를 이용해 활성화 시켰을 때.
디폴트 작용 event.fromElement에서 event.srcElement로 활성을 변경시킨다.
HTML 규격 비규격 IE 확장.

event
onbeforeactivate 이벤트
onbeforeactivate</b> 이벤트
공통
이전페이지로페이지 맨위로페이지 맨아래로

DHTML 개체 모델에서 이벤트처리자는 파라메터들을 직접 받지는 못해도, event개체의 쿼리를 사용할 수 있다.

altKey ALT 키가 눌렸는가를 반환하거나 설정한다.
altLeft 왼쪽 ALT 키가 눌렸는가를 반환하거나 설정한다.
wheelDelta 마우스의 굴림 단추가 굴러간 거리와 방향을 반환하거나 설정한다.
ctrlKey CTRL 키가 눌렸는가를 반환하거나 설정한다.
ctrlLeft 왼쪽 CTRL 키가 눌렸는가를 반환하거나 설정한다.
shiftKey SHIFT 키가 눌렸는가를 반환하거나 설정한다.
cancelBubble 현재 이벤트가 이벤트처리자들의 계통도에서 버블업(bubble up)하여야 하는가를 반환하거나 설정한다.
clientX 윈도우 장식과 스크롤바를 제외한 사용자 지역에 상대적 마우스포인터 수평 좌표를 반환하거나 설정한다.
clientY 윈도우 장식과 스크롤바를 제외한 사용자 지역에 상대적 마우스포인터 수직 좌표를 반환하거나 설정한다.
offsetX 이벤트가 발생된 개체에 마우스포인터의 상대적인 위치(오프세트) 수평 좌표를 반환하거나 설정한다.
offsetY 이벤트가 발생된 개체에 마우스포인터의 상대적인 위치(오프세트) 수직 좌표를 반환하거나 설정한다.
screenX 사용자 스크린에 상대적인 마우스포인터의 수평 위치를 반환하거나 설정한다.
screenY 사용자 스크린에 상대적인 마우스포인터의 수직 위치를 반환하거나 설정한다.
fromElement 이벤트에 의하여 작용이나 마우스포인터 중지되는 개체를 반환하거나 설정한다.
shiftLeft 왼쪽 SHIFT 키가 눌렸는가를 반환하거나 설정한다.
srcElement 이벤트를 발생시킨 개체를 반환하거나 설정한다.
type 이벤트 개체의 이벤트 명칭을 반환하거나 설정한다.
x 상대적으로 위치한 모체 개체에 상대적인 위치 수평 좌표를 반환하거나 설정한다.
y 상대적으로 위치한 모체 개체에 상대적인 위치 수직 좌표를 반환하거나 설정한다.
특기

IE5.5 이후, document에 초점을 주는 것과 documentactiveElement를 별도로 처리할 수 있다.

IE6에서, 엘레멘트가 활성화되었을 때 형식의 변경등을 위하여 onbeforeactivate 이벤트를 사용할 수 있다.

엘레멘트의 onbeforeactivate 이벤트의 취소는 어느 이벤트가 발생되었는가에 따라 다른 세가지 작용을 가진다.

주기 : 프로그램에 의하여 onbeforeactivate 이벤트가 발생되면 취소될 수 없다.

각 문서는 한개의 활성 엘레멘트 만을 가질수 있다. setActivefocus 메서드로 활성 엘레멘트를 지정한다. setActive 메서드로는 문서 초점에 영향을 주지 않는다. 개별 엘레멘트에 focus 메서드를 사용하면, 엘레멘트는 초점을 받고 활성 엘레멘트가 된다.

초점을 받지 않은 문서에서 focus 메서드를 사용하면 문서의 디스플레이된 제일 앞으로 이동하고, 그 문서의 활성 엘레멘트가 초점을 받는다.

언제나 한 엘레멘트 만 초점을 받을 수있고, 초점을 받는 엘레멘트만 키에 직접 영향을 받는다. 키를 눌러 발생된 이벤트는 다른 문서나 자식 엘레멘트에 영향을 주도록 스크립트로 작성할 수 있다.

적용
개체scriptHTMLIE
aa.onbeforeactivate=sCode<A onbeforeactivate=sCode>IE6(win32)
addressaddress.onbeforeactivate=sCode<ADDRESS onbeforeactivate=sCode>IE6(win32)
appletapplet.onbeforeactivate=sCode<APPLET onbeforeactivate=sCode>IE6(win32)
areaarea.onbeforeactivate=sCode<AREA onbeforeactivate=sCode>IE6(win32)
bb.onbeforeactivate=sCode<B onbeforeactivate=sCode>IE6(win32)
bdobdo.onbeforeactivate=sCode<BDO onbeforeactivate=sCode>IE6(win32)
bigbig.onbeforeactivate=sCode<BIG onbeforeactivate=sCode>IE6(win32)
blockQuoteblockQuote.onbeforeactivate=sCode<BLOCKQUOTE onbeforeactivate=sCode>IE6(win32)
bodybody.onbeforeactivate=sCode<BODY onbeforeactivate=sCode>IE6(win32)
buttonbutton.onbeforeactivate=sCode<BUTTON onbeforeactivate=sCode>IE6(win32)
captioncaption.onbeforeactivate=sCode<CAPTION onbeforeactivate=sCode>IE6(win32)
centercenter.onbeforeactivate=sCode<CENTER onbeforeactivate=sCode>IE6(win32)
citecite.onbeforeactivate=sCode<CITE onbeforeactivate=sCode>IE6(win32)
codecode.onbeforeactivate=sCode<CODE onbeforeactivate=sCode>IE6(win32)
customcustom.onbeforeactivate=sCode<CUSTOM onbeforeactivate=sCode>IE6(win32)
dddd.onbeforeactivate=sCode<DD onbeforeactivate=sCode>IE6(win32)
dfndfn.onbeforeactivate=sCode<DFN onbeforeactivate=sCode>IE6(win32)
dirdir.onbeforeactivate=sCode<DIR onbeforeactivate=sCode>IE6(win32)
divdiv.onbeforeactivate=sCode<DIV onbeforeactivate=sCode>IE6(win32)
dldl.onbeforeactivate=sCode<DL onbeforeactivate=sCode>IE6(win32)
documentdocument.onbeforeactivate=sCode없음IE6(win32)
dtdt.onbeforeactivate=sCode<DT onbeforeactivate=sCode>IE6(win32)
emem.onbeforeactivate=sCode<EM onbeforeactivate=sCode>IE6(win32)
embedembed.onbeforeactivate=sCode<EMBED onbeforeactivate=sCode>IE6(win32)
fieldSetfieldSet.onbeforeactivate=sCode<FIELDSET onbeforeactivate=sCode>IE6(win32)
fontfont.onbeforeactivate=sCode<FONT onbeforeactivate=sCode>IE6(win32)
formform.onbeforeactivate=sCode<FORM onbeforeactivate=sCode>IE6(win32)
hnhn.onbeforeactivate=sCode<hn onbeforeactivate=sCode>IE6(win32)
hrhr.onbeforeactivate=sCode<HR onbeforeactivate=sCode>IE6(win32)
ii.onbeforeactivate=sCode<I onbeforeactivate=sCode>IE6(win32)
imgimg.onbeforeactivate=sCode<IMG onbeforeactivate=sCode>IE6(win32)
buttonbutton.onbeforeactivate=sCode<INPUT type=button onbeforeactivate=sCode>IE6(win32)
checkboxcheckbox.onbeforeactivate=sCode<INPUT type=checkbox onbeforeactivate=sCode>IE6(win32)
FileUploadFileUpload.onbeforeactivate=sCode<INPUT type=file onbeforeactivate=sCode>IE6(win32)
imageimage.onbeforeactivate=sCode<INPUT type=image onbeforeactivate=sCode>IE6(win32)
resetreset.onbeforeactivate=sCode<INPUT type=reset onbeforeactivate=sCode>IE6(win32)
passwordpassword.onbeforeactivate=sCode<INPUT type=password onbeforeactivate=sCode>IE6(win32)
radioradio.onbeforeactivate=sCode<INPUT type=radio onbeforeactivate=sCode>IE6(win32)
submitsubmit.onbeforeactivate=sCode<INPUT type=submit onbeforeactivate=sCode>IE6(win32)
texttext.onbeforeactivate=sCode<INPUT type=text onbeforeactivate=sCode>IE6(win32)
kbdkbd.onbeforeactivate=sCode<KBD onbeforeactivate=sCode>IE6(win32)
labellabel.onbeforeactivate=sCode<LABEL onbeforeactivate=sCode>IE6(win32)
legendlegend.onbeforeactivate=sCode<LEGEND onbeforeactivate=sCode>IE6(win32)
lili.onbeforeactivate=sCode<LI onbeforeactivate=sCode>IE6(win32)
listinglisting.onbeforeactivate=sCode<LISTING onbeforeactivate=sCode>IE6(win32)
mapmap.onbeforeactivate=sCode<MAP onbeforeactivate=sCode>IE6(win32)
marqueemarquee.onbeforeactivate=sCode<MARQUEE onbeforeactivate=sCode>IE6(win32)
menumenu.onbeforeactivate=sCode<MENU onbeforeactivate=sCode>IE6(win32)
nextIDnextID.onbeforeactivate=sCode<nextID onbeforeactivate=sCode>IE6(win32)
noBRnoBR.onbeforeactivate=sCode<NOBR onbeforeactivate=sCode>IE6(win32)
olol.onbeforeactivate=sCode<OL onbeforeactivate=sCode>IE6(win32)
pp.onbeforeactivate=sCode<P onbeforeactivate=sCode>IE6(win32)
plainTextplainText.onbeforeactivate=sCode없음IE6(win32)
prepre.onbeforeactivate=sCode<PRE onbeforeactivate=sCode>IE6(win32)
rtrt.onbeforeactivate=sCode<RT onbeforeactivate=sCode>IE6(win32)
rubyruby.onbeforeactivate=sCode<RUBY onbeforeactivate=sCode>IE6(win32)
ss.onbeforeactivate=sCode<S onbeforeactivate=sCode>IE6(win32)
sampsamp.onbeforeactivate=sCode<SAMP onbeforeactivate=sCode>IE6(win32)
selectselect.onbeforeactivate=sCode<SELECT onbeforeactivate=sCode>IE6(win32)
smallsmall.onbeforeactivate=sCode<SMALL onbeforeactivate=sCode>IE6(win32)
spanspan.onbeforeactivate=sCode<SPAN onbeforeactivate=sCode>IE6(win32)
strikestrike.onbeforeactivate=sCode<STRIKE onbeforeactivate=sCode>IE6(win32)
strongstrong.onbeforeactivate=sCode<STRONG onbeforeactivate=sCode>IE6(win32)
subsub.onbeforeactivate=sCode<SUB onbeforeactivate=sCode>IE6(win32)
supsup.onbeforeactivate=sCode<SUP onbeforeactivate=sCode>IE6(win32)
tabletable.onbeforeactivate=sCode<TABLE onbeforeactivate=sCode>IE6(win32)
tBodytBody.onbeforeactivate=sCode<TBODY onbeforeactivate=sCode>IE6(win32)
tdtd.onbeforeactivate=sCode<TD onbeforeactivate=sCode>IE6(win32)
textAreatextArea.onbeforeactivate=sCode<TEXTAREA onbeforeactivate=sCode>IE6(win32)
tFoottFoot.onbeforeactivate=sCode<TFOOT onbeforeactivate=sCode>IE6(win32)
thth.onbeforeactivate=sCode<TH onbeforeactivate=sCode>IE6(win32)
tHeadtHead.onbeforeactivate=sCode<THEAD onbeforeactivate=sCode>IE6(win32)
trtr.onbeforeactivate=sCode<TR onbeforeactivate=sCode>IE6(win32)
tttt.onbeforeactivate=sCode<TT onbeforeactivate=sCode>IE6(win32)
uu.onbeforeactivate=sCode<U onbeforeactivate=sCode>IE6(win32)
ulul.onbeforeactivate=sCode<UL onbeforeactivate=sCode>IE6(win32)
varvar.onbeforeactivate=sCode<VAR onbeforeactivate=sCode>IE6(win32)
xmpxmp.onbeforeactivate=sCode<XMP onbeforeactivate=sCode>IE6(win32)


event
onbeforeactivate 이벤트
onbeforeactivate</b> 이벤트
속성
이전페이지로페이지 맨위로페이지 맨아래로
event
onbeforeactivate 이벤트
속성공통
이전페이지로페이지 맨위로
최종 수정:
05/13/2025 13:03:21
KoXo Homepage
All right reserved
비정상적인 방식으로 프레임없이 페이지에 접속하면 자주 오류가 발생됩니다.
오류가 나면 정상적 접속으로 시도해 보세요.
http://koxo.com/lang/js/event/onbeforeactivate.html