Ver Mensaje Individual
  #6 (permalink)  
Antiguo 01/05/2012, 12:01
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Mas de una funcion/evento para el atributo onclick

Me concentro en tu pregunta original, pasar más de una función con onclick

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>3 funciones onclick</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript">
  7. //<![CDATA[
  8. var a1;
  9. var b1;
  10.  
  11. function f1(a){
  12. a1 = a;
  13. }
  14.  
  15. function f2(b){
  16. b1 = b;
  17. }
  18.  
  19. function f3(){
  20. alert(a1 + '-' + b1);
  21. }
  22. //]]>
  23. </head>
  24. <a href="#" onclick="f1('uno');f2('dos');f3(); return false;">link</a>
  25. </body>
  26. </html>

Podés pasar 2 y más, hasta ahi no hay inconveniente
Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.