Ver Mensaje Individual
  #7 (permalink)  
Antiguo 17/07/2011, 09:19
davape9
 
Fecha de Ingreso: octubre-2008
Mensajes: 171
Antigüedad: 15 años, 6 meses
Puntos: 2
Respuesta: Tecla Esc cierra pagina web

Cita:
Iniciado por dogduck Ver Mensaje
...
Te has equivocado amigo:

Código HTML:
<html>

<head>
<title>Cerrar con Esc</title>

<script>
function tecla() 
{ 
latecla = window.event.keyCode 
if (latecla==207) {
var padre=window.self;
padre.opener = window.self;
padre.close();
} 
} 
</script>
</head>

<BODY onkeypress="tecla()"> 


</body>

</html> 
if (latecla=207) {
if (latecla==207) {

Un saludo jeje