@@ -9,8 +9,11 @@ $(function() {
9
9
10
10
11
11
function validar ( forma ) {
12
+ // Imprimiendo datos de Inicio
12
13
console . log ( " " ) ;
13
14
console . log ( "Validando Formulario........................" ) ;
15
+
16
+ // Asignando Variables
14
17
var usuario = forma . usuario ;
15
18
var apellido = forma . apellido ;
16
19
var telefono = forma . telefono ;
@@ -21,16 +24,16 @@ function validar(forma){
21
24
22
25
23
26
24
-
27
+ // Imprime los datos Insertados
25
28
console . log ( "El Usuario es " + usuario . value + " ,el Apellido es " + apellido . value +
26
29
" ,el Teléfono es " + telefono . value + " ,el Correo es " + correo . value +
27
30
" ,la Contrasena es " + contrasena . value + " .\n" +
28
31
"Participando Sorteo de Camiseta de América de Cali" ) ;
29
32
30
33
31
-
32
- if ( usuario . value == "" || usuario . value == "Escribe Nombres"
33
- ) {
34
+ // Si no ingresa datos/ focus y alert
35
+ if ( usuario . value == "" || usuario . value == "Escribe Nombres" )
36
+ {
34
37
alert ( "Debe Escribir un nombre" ) ;
35
38
usuario . focus ( ) ;
36
39
usuario . select ( ) ;
@@ -43,23 +46,23 @@ function validar(forma){
43
46
apellido . select ( ) ;
44
47
}
45
48
46
- else if ( telefono . value == "" || telefono . value == "Escribe Apellidos " )
49
+ else if ( telefono . value == "" || telefono . value == "Escribe Telefono " )
47
50
{
48
51
alert ( "Debe Escribir un Teléfono" ) ;
49
52
telefono . focus ( ) ;
50
53
telefono . select ( ) ;
51
54
}
52
55
53
56
54
- else if ( correo . value == "" || correo . value == "Escribe Apellidos " )
57
+ else if ( correo . value == "" || correo . value == "Escribe Correo " )
55
58
{
56
59
alert ( "Debe Escribir un Correo" ) ;
57
60
correo . focus ( ) ;
58
61
correo . select ( ) ;
59
62
}
60
63
61
64
62
- else if ( contrasena . value == "" || contrasena . value == "Escribe Apellidos " )
65
+ else if ( contrasena . value == "" || contrasena . value == "Escribe Contrasena " )
63
66
{
64
67
alert ( "Debe Escribir una Contraseña" ) ;
65
68
contrasena . focus ( ) ;
@@ -77,7 +80,7 @@ function validar(forma){
77
80
78
81
79
82
80
-
83
+ // Equipos chequeados y no chequeados
81
84
var equipo = forma . equipo ;
82
85
var checkseleccionado = false ;
83
86
0 commit comments