Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en">
- <head>
- <title>DSRLab2</title>
- <script type="text/javascript">
- function validacion()
- { //open function
- var nombre
- var apellido
- nombre = document.form1.txtnombre.length
- apellido = document.form1.txtapellido.length
- if (nombre < 1)
- {
- alert("Por favor ingrese su nombre");
- }
- else if (apellido < 1)
- {
- alert("Por favor ingrese su apellido");
- }
- }//end function
- </script>
- </head>
- <body bgcolor="ff99ff">
- <h1>Formulario General:</h1>
- <form name="form1">
- Nombre: <input type="text" name="txtnombre">
- <br> <br>
- Apellido Paterno: <input type="text" name="txtapellido">
- <br> <br>
- Correo Electronico: <input type="text" name="txtcorreo">
- <br> <br>
- Pueblo: <input type="text" name="txtPueblo"> Pais: <input type="text" name="txtpais">
- <br> <br>
- Rango de edad: <br>
- <input type="radio" name="rango" value="menor de 20">Menor de 20
- <br>
- <input type="radio" name="rango" value="20 - 40">20 - 40
- <br>
- <input type="radio" name="rango" value="40 - 60">40 - 60
- <br>
- <input type="radio" name="rango" value="60 o mas">60 o mas
- <br> <br>
- Pasatiempo favoritos
- <br>
- <input type="checkbox" name="pasatiempos">Viajar
- <br>
- <input type="checkbox" name="musica">Musica
- <br>
- <input type="checkbox" name="videojuegos">Video Juegos
- <br>
- <input type="checkbox" name="playa">Playa
- <br>
- <input type="checkbox" name="ejercicios">Ejercicios
- <br> <br>
- <table>
- <th>
- Escriba su opinion sobre su programa de estudios:
- </th>
- <td>
- <textarea rows="4" cols="50">
- </textarea>
- </td>
- <th>
- Sugerencias:
- <th>
- <td>
- <textarea rows="4" cols="50">
- </textarea>
- </td>
- </table>
- <br>
- ¿Cuantas horas navega en internet diariamente? (Aproximado)
- <br>
- <br>
- <select>
- <option value="1 hora">1 hora</option>
- <option value="2 horas">2 horas</option>
- <option value="3 horas">3 horas</option>
- <option value="4 horas">4 horas</option>
- <option value="5 horas">5 horas</option>
- <option value="6 horas">6 horas</option>
- <option value="7 horas">7 horas</option>
- <option value="8 horas">8 horas</option>
- <option value="9 horas">9 horas</option>
- <option value="10 horas">10 horas</option>
- </select>
- <br>
- <br>
- <input type="submit" name="enviar" value="Enviar Formulario" onclick="validacion()">
- <input type="submit" name="borrar" value="Borrar Formulario">
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment