Skip to content

드래그시 자동복사

MintState October 31, 2008 at 11:43 AM Views 12927

드래그시 자동복사

<script language="javascript">
bBool=false
var copiedtext=""
var tempstore=""

function initiatecopy() {
	bBool=true;
}

function copyit() {
	if (bBool) {
		tempstore=copiedtext
		document.execCommand("Copy")
		copiedtext=window.clipboardData.getData("Text");
		if (tempstore!=copiedtext) {
			alert(copiedtext);
		}
		bBool=false;
	}
}
document.onselectionchange = initiatecopy
document.onmouseup = copyit
</script>
드래그시 자동복사 됩니다.
Share X Facebook LINE QR code

0 comments

Be the first to comment.