elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
26 Mayo 2012, 14:12  


Tema destacado: Grupo de Facebook de elhacker.net

+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web
| | |-+  pequeña ayuda con HTML
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: pequeña ayuda con HTML  (Leído 992 veces)
~ Ghost_Networks ~

Desconectado Desconectado

Mensajes: 126



Ver Perfil
pequeña ayuda con HTML
« en: 26 Junio 2011, 23:53 »

Hola que tal como estan? bueno hace poco que empese a meter mano con html pero eh aqui un pequeño problema, yo empese hacerlo a mano, no uso programas .... cuestion es que tengo este codigo:
Código:
<html>
  <head> <title> Trabajo para Teleinformatica </title> </head>
  <body bgcolor="#FF0000"text="#00FFFF">
      <hr align=center width=50%>
       <h2><center><u>Datos Importantes de una persona</u></center></h2>
      <hr align=center width=50%>
   
<table width=25% align=center border=2>
<tr align=center>

  <td width=40% align=left>
    <td>
    <b><u> Apellido:</b></u></td><td><Input type ="text"></td>
    </tr>
    <td>
    </td>
    </td>
    </tr>
    <br>
    <br>
</tr>
<tr align=center>
<td width=40% align=left>
<td>
    <b><u> Nombre:</b></u></td><td><Input type ="text"></td>
    </tr>
    <td>
    </td>
    </tr>
<br>
<br>

<td width=20% align=right>
<td>
<b><u>Tipo de Documento:</b></u></td>
<td><SELECT NAME="Documentos">
  <OPTION>DNI</OPTION>
  <OPTION>Cedula</OPTION>
  <OPTION>Libreta de Enrolamiento</OPTION>
  <OPTION>Pasaporte</OPTION>
  <OPTION>Registro Geral</OPTION>
</SELECT></td>
</td>
</tr>
<br>
<br>
<tr align=center>
<td width=40% align=left>
<td>
<b><u>Nacionalidad:</b></u></td><td>
  <SELECT NAME="Nacionalidad">
  <OPTION>Argentina</OPTION>
  <OPTION>Alemania</OPTION>
  <OPTION>Japon</OPTION>
  <OPTION>Italia</OPTION>
  <OPTION>Brasil</OPTION>
</SELECT></td>
</td>
</tr>
<tr align=center>
<td width=40% align=left>
<td><b><u>Casado:</b></u></td><td>
<input type = "radio" name="Si" vaule "1">Si
<input type = "radio" name="Si" vaule "0">No
</SELECT></td>
</td>
</tr>
<br>
<br>
<tr align=center>
<td width=40% align=left>
<td><b><u>Estudios:</b></u></td>
<br>
<td><input type="checkbox" align= right> Jardin
<br>
<br>
<input type="checkbox" align= right> EGB
<br>
<br>
<input type="checkbox" align= right> Polimodal
<br>
<br>
<input type="checkbox" align= right> Univercitario
<br>
<br>
<input type="checkbox > Otros
<br>
<br>

</SELECT></td>

</td>
</tr>



</table>
</html>

Pero yo lo que quiero es x ej que los checkbox me queden alineados uno de bajo de otro, y que donde dice: nacionalidad y tipo de documento que los "combobox" queden al mismo tamaño que el texto de nombre y apellido, se entiende?
Gracias y dsiculpen las molestias


En línea
~ Ghost_Networks ~

Desconectado Desconectado

Mensajes: 126



Ver Perfil
Re: pequeña ayuda con HTML
« Respuesta #1 en: 27 Junio 2011, 00:08 »

Olviden lo de ordenar los checkbox ya lo logre jeje :P pero aun asi hay forma x ej de si selecciono 1 que los otros se selecciones ejemplo simple:
Estudios
Jardin
EGB (Primaria)
Polimodal(Secundaria)
Universitario

Si x ej yo elijo el checkbox Polimodal automaticamente deberia tildarse Jardin y EGB, se entiende?


En línea
Spider-Net


Desconectado Desconectado

Mensajes: 1.052


Un gran poder conlleva una gran responsabilidad


Ver Perfil WWW
Re: pequeña ayuda con HTML
« Respuesta #2 en: 27 Junio 2011, 00:46 »

Para eso hay que utilizar javascript.
En línea

"Si cuando hablas nadie se molesta, eso es que no has dicho absolutamente nada."
dark_sargon


Desconectado Desconectado

Mensajes: 532


CJ


Ver Perfil WWW
Re: pequeña ayuda con HTML
« Respuesta #3 en: 28 Junio 2011, 18:04 »

Hola. Como dice Spider-Net se puede hacer con javascript.

Acá te dejo una solución no muy pulida pero funciona:
Código:
<html>
<head>
<script type="text/javascript" language="javascript">
  function comprobar(){
      if(document.getElementById('ch2').checked){
        document.getElementById('ch1').checked = true;
      }else if(document.getElementById('ch3').checked){
        document.getElementById('ch1').checked = true;
        document.getElementById('ch2').checked = true;
      }else if(document.getElementById('ch4').checked){
        document.getElementById('ch1').checked = true;
        document.getElementById('ch2').checked = true;
        document.getElementById('ch3').checked = true;
      }
  }
</script>
</head>

<body>
<h1>Estudios</h1>

<form name="formulario">
  <input name="ch1" type="checkbox" id="ch1" onChange="comprobar();"/>Jardin
  <br/>

  <input name="ch2" type="checkbox" id="ch2" onChange="comprobar();"/>EGB (Primaria)

  <br/>

  <input name="ch3" type="checkbox" id="ch3" onChange="comprobar();"/>Polimodal (Secundaria)

  <br/>

  <input name="ch4" type="checkbox" id="ch4" onChange="comprobar();"/>Universitario

  <br/>
</form>
</body>
</html>

Saludos.
En línea

http://www.actimediaonline.com
Diseño Web, animación y más.

http://www.ciudadoscura.com
Diseño Web, electrónica, programación, móviles y más.
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
UNA PEQUEÑA AYUDA
Dispositivos Móviles (PDA's, Smartphones)
sliver167 1 428 Último mensaje 12 Mayo 2005, 05:27
por fandango
problemas con la pc una pequeña ayuda
Hardware
takumi_01 5 440 Último mensaje 21 Enero 2007, 23:45
por takumi_01
pequeña ayuda
Programación Visual Basic
YEVIT 2 390 Último mensaje 10 Mayo 2007, 23:51
por Hans el Topo
una pequeña ayuda
Programación C/C++
hellsing00 12 1,059 Último mensaje 9 Julio 2009, 15:44
por VonN
Una Pequeña Ayuda
Hacking Básico
trcka 8 1,162 Último mensaje 12 Enero 2011, 21:42
por R007h
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines