Ver Mensaje Individual
  #5 (permalink)  
Antiguo 17/12/2012, 07:19
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Quitar foco luego de pulsar una tecla

es prácticamente lo mismo
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="es" xml:lang="es">
<head>
<title>Documento sin título</title>
<style type="text/css">
.seleccionado {background:#FF0000;}
.deseleccionado {background:#FFF;}
</style>
<script type="text/javascript">
function rango(evt, obj) {
var keyCode = (document.all) ? evt.keyCode : evt.which;
if(keyCode == 8) return;
if (/[1-6]/.test(String.fromCharCode(keyCode))) {
if(keyCode == 49) {
obj.nextElementSibling.focus();
} else {
alert("hay que ingresar una observación");
}
}
}
</script>
</head>
<body>
<form>
<input type="text" name="descarte" id="descarte" size="2" maxlength="1" onkeyup="return rango(event, this);">
<input type="text" name="des" id="des">
</form>
</body>
</html>
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}