Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/09/2002, 12:25
Avatar de DragonX
DragonX
Colaborador
 
Fecha de Ingreso: mayo-2002
Ubicación: Funkyland
Mensajes: 8.433
Antigüedad: 22 años, 8 meses
Puntos: 177
Script Copy/Paste

Introduciendo este script entre los tags de <head>.....</head>, con solo seleccionar el texto "pintandolo" se copia instantaneamente sin tener que acceder a Edit>Copy.

Espero que les resulte util!

<script>

//Script realizado por DragonX
//consultas [email protected]
//bases sacadoa de Dynamicdrive.com

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>


Salu2 :cantar: