Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/09/2005, 05:30
eContento
 
Fecha de Ingreso: junio-2004
Mensajes: 621
Antigüedad: 20 años, 8 meses
Puntos: 25
Código de ejemplo

Código:
<html>
<head>
	<title>Untitled</title>
<script language="JavaScript">
	function probar(){
		alert("¡¡¡Funciona!!!");
	}	

	var accionPorDefecto = "probar()";
	
	function handleEnter(evt) {
	    evt = (evt) ? evt : ((window.event) ? event : null);
	    if (evt) {
			if(evt.keyCode==13){
				eval(accionPorDefecto);
			}
		}
	}
	
	document.onkeydown = handleEnter;
</script>
</head>

<body>
</body>
</html>
__________________
eContento
- Mis artículos y tutoriales
- Mis jsfiddles