시스템 클립보드(clipboard)로부터 데이터를 붙여넣기하면 문서의 목표 개체에 발생한다.


이벤트 속성
object.onpaste=handler JScript 만-
object.onpaste=GetRef('handler') VBScript 5.0-
인라인 HTML <ELEMENT onpaste="handler"> 모든 플랫트폼
명명된 스크립트 <SCRIPT for=object event=onpaste> Explorer-
이벤트 특성
Bubbles 있슴
취소 가능
발생 원인 텍스트를 선택한 다음:
  • 윈도우 메뉴에서나 오른쪽 마우스를 클릭한 후 '붙여넣기'를 선택하였을 때.
  • CTRL+V을 눌렀을 때.
디폴트 작용 시스템 클립보드로 부터 데이터를 문서의 지정한 위치로 붙여넣기 한다.
HTML 규격 비규격 IE 확장.

event
onpaste 이벤트
onpaste</b> 이벤트
견본예제공통
이전페이지로페이지 맨위로페이지 맨아래로

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

altKey ALT 키가 눌렸는가를 반환하거나 설정한다.
altLeft 왼쪽 ALT 키가 눌렸는가를 반환하거나 설정한다.
cancelBubble 현재 이벤트가 이벤트처리자들의 계통도에서 버블업(bubble up)하여야 하는가를 반환하거나 설정한다.
clientX 윈도우 장식과 스크롤바를 제외한 사용자 지역에 상대적 마우스포인터 수평 좌표를 반환하거나 설정한다.
clientY 윈도우 장식과 스크롤바를 제외한 사용자 지역에 상대적 마우스포인터 수직 좌표를 반환하거나 설정한다.
ctrlKey CTRL 키가 눌렸는가를 반환하거나 설정한다.
ctrlLeft 왼쪽 CTRL 키가 눌렸는가를 반환하거나 설정한다.
dataTransfer 끌어 놓기(drag-and-drop) 작업들을 위해 사전에 정의된 클립보드 양식들을 제공한다.
offsetX 이벤트가 발생된 개체에 마우스포인터의 상대적인 위치(오프세트) 수평 좌표를 반환하거나 설정한다.
offsetY 이벤트가 발생된 개체에 마우스포인터의 상대적인 위치(오프세트) 수직 좌표를 반환하거나 설정한다.
returnValue 이벤트로 부터의 반환값을 반환하거나 설정한다.
screenX 사용자 스크린에 상대적인 마우스포인터의 수평 위치를 반환하거나 설정한다.
screenY 사용자 스크린에 상대적인 마우스포인터의 수직 위치를 반환하거나 설정한다.
shiftKey SHIFT 키가 눌렸는가를 반환하거나 설정한다.
shiftLeft 왼쪽 SHIFT 키가 눌렸는가를 반환하거나 설정한다.
srcElement 이벤트를 발생시킨 개체를 반환하거나 설정한다.
type 이벤트 개체의 이벤트 명칭을 반환하거나 설정한다.
x 상대적으로 위치한 모체 개체에 상대적인 위치 수평 좌표를 반환하거나 설정한다.
y 상대적으로 위치한 모체 개체에 상대적인 위치 수직 좌표를 반환하거나 설정한다.

특기

사용자가 '붙여넣기' 코드를 만드는 경우 다음 과정이 필요하다;

  1. onbeforepaste 이벤트 속에 이벤트 개체 returnValue 속성을 false로 설정하면, 단축메뉴에서 붙여넣기 항목을 사용할 수 있다.
  2. onpaste 이벤트처리자 속에 이벤트 개체의 returnValue 속성을 false로 설정하여 브라우저의 디폴트 작용을 중지시킨다. 이는 INPUT type=text와 같은 디폴트 작용이 있는 개체들에만 해당된다.
  3. clipboardData 개체에 getData 메서드를 통하여 선택된 내용을 붙여넣기 하는 형식을 지정한다.
  4. onpaste 이벤트에서 붙여넣기하는 코드를 실행한다.

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


event
onpaste 이벤트
onpaste</b> 이벤트
속성예제공통
이전페이지로페이지 맨위로페이지 맨아래로

event
onpaste 이벤트
onpaste</b> 이벤트
속성견본공통
이전페이지로페이지 맨위로페이지 맨아래로

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