| |||
Respuesta: Salto de input al llenarlo Podrías usar el evento onkeyup en cada input. Al presionar una tecla en un input, verificar si la longitud del campo es del tamaño que quieres, hacer un focus() al campo siguiente. |
| ||||
Respuesta: Salto de input al llenarlo a ver si esto te sirve Cita: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script type="text/javascript"> function tabular(obj, tam) { var frm=obj.form; var largo = obj.value.length; if (largo == tam) { for(i=0;i<frm.elements.length;i++) { if(frm.elements[i]==obj) { if (i==frm.elements.length-1) { i=-1; } break; } } frm.elements[i+1].focus(); return false; } } </script> </head> <body> <form> <input type="text" maxlength="2" onkeypress="return tabular(this, this.maxLength)" /> <input type="text" maxlength="2" onkeypress="return tabular(this, this.maxLength)" /> <input type="text" maxlength="3" onkeypress="return tabular(this, this.maxLength)" /> <input type="text" maxlength="4" onkeypress="return tabular(this, this.maxLength)" /> </form> </body> </html>
__________________ if(ViolenciaDeGénero) {alert('MUJER ASESINADA');} |
Etiquetas: |