onbeforecopy, oncopy, onbeforepaste, oncpaste À̺¥Æ® °øÅë ¿¹Á¦
¿øº»:
¸ñÇ¥:
¿øº»À» º¹»çÇÏ¿© ¸ñÇ¥¿¡ ºÙ¿©³Ö±â ÇØ º¸¶ó. <SCRIPT> var strAll=''; function onbeforecopyAction(){ showAll.innerHTML+='onbeforecopy À̺¥Æ®<BR>'; OrgObj.select(); showit(); } function toClipboard(){ showAll.innerHTML+='oncopy À̺¥Æ®<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" onbeforecopy="onbeforecopyAction()" oncopy="toClipboard()" onfocus="this.select()" value="¿øº» ÀÔ·Â ¹®ÀÚ¿"> ¸ñÇ¥: <INPUT id="TgtObj" onbeforepaste="beforepaseAction()" onpaste="DoPaste()" onfocus="this.select()" value="¸ñÇ¥ Áö¿ª ¹®ÀÚ¿"> <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> |