Ver Mensaje Individual
  #6 (permalink)  
Antiguo 07/02/2010, 19:07
Avatar de jackson666
jackson666
 
Fecha de Ingreso: noviembre-2009
Ubicación: Buenos Aires, Argentina
Mensajes: 1.971
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: problema a cambiar el ancho

Era solo cosa de sacar afuera la variable ancho...

Código Javascript:
Ver original
  1. <style type="text/css">
  2. #resizable{
  3.     width: 100px;
  4.     height: 40px;
  5.     border: 1px solid #000000;
  6.     background-color: orange;
  7. }
  8. </style>
  9. <script type="text/javascript">
  10. var ancho = 100;
  11. function tama(pid){
  12.     ancho += 10;
  13.     document.getElementById(pid).style.width = ancho+'px';
  14. }
  15. </script>
  16. </head>
  17. <body>
  18. <div id="resizable"></div>
  19. <a href="javascript:tama('resizable');">Agrandar</a>
  20. </body>
__________________
HV Studio
Diseño y desarrollo web