onbeforecut, oncut, onbeforepaste, oncpaste À̺¥Æ® °øÅë ¿¹Á¦

¿øº»: ¸ñÇ¥:
¿øº» 
Ŭ¸³º¸µå 
¸ñÇ¥ 
ÁøÇà

¿øº»À» À߶󳻱âÇÏ¿© ¸ñÇ¥¿¡ ºÙ¿©³Ö±â ÇØ º¸¶ó.

<SCRIPT>
var strAll='';
function onbeforecutAction(){
  showAll.innerHTML+='onbeforecut À̺¥Æ®<BR>';
  OrgObj.select();
  showit();
}

function toClipboard(){
  showAll.innerHTML+='oncut À̺¥Æ®<BR>';
  window.clipboardData.setData('Text',OrgObj.value);
  showit();
}

function beforepaseAction(){
  showAll.innerHTML+='onbeforepase À̺¥Æ®<BR>';
}

function DoPaste(){
  showAll.innerHTML+='onpaste À̺¥Æ®<BR>';
  TgtObj.value=window.clipboardData.getData('Text');
  showit();
}

function showit(){
  showOrg.innerHTML=OrgObj.value;
  showCB.innerHTML=window.clipboardData.getData('Text');
  showTgt.innerHTML=TgtObj.value;
}
</SCRIPT>
¿øº»: <INPUT id="OrgObj"
  onbeforecut="onbeforecutAction()" oncut="toClipboard()" onfocus="this.select()" value="¿øº» ÀÔ·Â ¹®ÀÚ¿­">
¸ñÇ¥: <INPUT id="TgtObj"
  onbeforepaste="beforepaseAction()" onpaste="DoPaste()" onfocus="this.select()" value="¸ñÇ¥ Áö¿ª ¹®ÀÚ¿­">
<BUTTON onClick="OrgObj.value='¿øº» ÀÔ·Â ¹®ÀÚ¿­';TgtObj.value='¸ñÇ¥ Áö¿ª ¹®ÀÚ¿­';showAll.value=''">´Ù½Ã</BUTTON>
<TABLE border=1 width=100%>
<TR><TD width=15%>¿øº»</TD><TD id=showOrg width=90%> </TD></TR>
<TR><TD>Ŭ¸³º¸µå</TD><TD id=showCB> </TD></TR>
<TR><TD>¸ñÇ¥</TD><TD id=showTgt> </TD></TR>
<TR><TD>ÁøÇà</TD><TD id=showAll> </TD></TR>
</TABLE>