Ver Mensaje Individual
  #9 (permalink)  
Antiguo 25/06/2010, 08:20
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 17 años, 4 meses
Puntos: 126
Respuesta: ¿como se guarda en una variable el name de un objeto?

Cita:
Iniciado por Panino5001 Ver Mensaje
Me temo que _cronos2 tiene razón con respecto a id y name: http://www.w3.org/TR/html401/types.html#type-name
Vaya, por unos momentos me has puesto en duda. Pero no, después de probarlo en IE, FF, Opera y Chrome

Código Javascript:
Ver original
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <script type="text/javascript">
  5. function funcion() {
  6. alert(document.getElementById('6').innerHTML);
  7. }
  8. </script>
  9. </head>
  10. <body>
  11. <input type="button" onclick="funcion()" value="ver" />
  12. <div id="6" name="ultimanoticia" class="visible">
  13. <p>
  14. Noticia 6
  15. </p>
  16. </div>
  17. </body>
  18. </html>
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />