Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/04/2010, 12:14
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 17 años, 4 meses
Puntos: 126
Respuesta: Propiedades de imagen

Hola

A ver si esto te da alguna idea

Código Javascript:
Ver original
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function redimensionar (accion) {
  5. var height, width
  6. var alto = document.getElementById("mesa").height;
  7. var ancho = document.getElementById("mesa").width;
  8. if (accion == 'sumar') {
  9. height = parseInt(alto+10);
  10. width = parseInt(ancho+10);
  11. document.getElementById("mesa").style.height = height + "px";
  12. document.getElementById("mesa").style.width = width + "px";
  13. }
  14. else
  15. {
  16. height = parseInt(alto-10);
  17. width = parseInt(ancho-10);
  18. document.getElementById("mesa").style.height = height + "px";
  19. document.getElementById("mesa").style.width = width + "px";
  20. }
  21. }
  22. </script>
  23. </head>
  24. <body>
  25. <img src="iconos/anixmas11.gif" id="mesa" width="50px" height="53px" /><br/>
  26. <input type="button" value="+" onclick="redimensionar('sumar')" /><br/>
  27. <input type="button" value="-" onclick="redimensionar()" />
  28. </body>
  29. </html>

Suerte
__________________
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;" />