New Revised CSS Library Forums Web Tools
FAQs Awards Usage Terms Contact

<html>

<head>

<script>

//Copytext to clipboard- by Gennero (patrice.gennero@voila.fr)
//Submited to DynamicDrive.com
//Visit http://www.dynamicdrive.com for this script

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>

</head>

</html>