Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/04/2009, 14:30
Avatar de pato12
pato12
 
Fecha de Ingreso: septiembre-2007
Ubicación: Salta
Mensajes: 1.620
Antigüedad: 17 años, 4 meses
Puntos: 101
Respuesta: Como leer esto

Hola,
Gracias por responder rapido.
Lo que quiero es no repetir tanto alert(objeto.atributo):
Código html:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4. <title>Documento sin t&iacute;tulo</title>
  5. <script type="text/javascript">
  6. <!--
  7. function alertar(ob){
  8.     alert(ob.hola);
  9.     alert(ob.chau);
  10.     alert(ob.adios);
  11.     alert(ob.fuera);
  12.     alert(ob.sal);
  13. }
  14. -->
  15. </head>
  16.  
  17. <input name="Bot&oacute;n" type="button" onclick="alertar({hola:'Hola',chau:'Chau',adios:'Adios!!!',fuera:'Fuera de aqui!!',sal:'Sal de aqui'})" value="Probar" />
  18. </body>
  19. </html>
Gracias
Salu2
__________________
Half Music - www.halfmusic.com