Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/03/2004, 03:49
rsalvadores
 
Fecha de Ingreso: octubre-2003
Mensajes: 40
Antigüedad: 21 años, 3 meses
Puntos: 0
Esta es una forma un poco chapuza, imagino que las hay más elegantes.

<html>
<head>
<title>URL Portapapeles</title>
<script language="JavaScript">
function URLportapapeles(){
document.getElementById("hidURL").value=document.U RL
var _varURL=document.getElementById("hidURL")
document.getElementById("LyURLHid").style.visibili ty="visible"
_varURL.focus();
_varURL.select();
document.getElementById("LyURLHid").style.visibili ty="hidden"
if (document.all) {
rango = _varURL.createTextRange();
rango.execCommand("Copy");
alert ("Copiado en el portapapeles la URL:\n"+document.getElementById("hidURL").value)
}
}
</script>

<body bgcolor="#FFFFFF" text="#000000">
<div id="LyURLHid" style="visibility: hidden">
<form name="formCoor">
<input type="text" name="hidURL" id="hidURL" value="">
</form>
</div>
<p><a href="javascript:URLportapapeles()">Copiar URL</a> </p>
</body>
</html>

Suerte

rsalvadores