Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/02/2009, 10:40
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Respuesta: Quien ejecuto el evento?

En Firefox funciona. Sólo hay que hay que pasar el argumento event:
Código javascript:
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. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Documento sin t&iacute;tulo</title>
  6. <script>
  7. function algo(e){
  8. var e=e || window.event;
  9. var disparador=e.srcElement || e.target;
  10. alert(disparador.nodeName);
  11. }
  12. </script>
  13. </head>
  14.  
  15. <body>
  16. <div onclick="algo(event)">click</div>
  17. </body>
  18. </html>