Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/06/2012, 22:07
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: cargar un imagen dentro de un html.

Para eso necesitas de javascript, algo muy básico

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>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6.  
  7. <style type="text/css">
  8. /*<![CDATA[*/
  9.  
  10. /* estilos */
  11. div{
  12. float: left;
  13. }
  14. /*]]>*/
  15. </head>
  16. <div><img src="c.jpg" alt="" width="300" height="300" id="marco" /></div>
  17. <div>
  18. <img src="a_thumb.jpg" alt="" width="100" height="100" onclick="document.getElementById('marco').src ='a.jpg';" /><br />
  19. <img src="b_thumb.jpg" alt="" width="100" height="100" onclick="document.getElementById('marco').src ='b.jpg';"/><br />
  20. </div>
  21.  
  22. </body>
  23. </html>

la idea es que al hacer click en las miniuaturas reemplaces el valor del src de la imagen por defecto que tiene por id="marco"
En el primer caso la substitución sería de a.jpg x c.jpg y en el segundo, b.jpg x c.jpg

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.