Ver Mensaje Individual
  #7 (permalink)  
Antiguo 23/12/2009, 17:37
bebo
 
Fecha de Ingreso: octubre-2009
Mensajes: 97
Antigüedad: 14 años, 6 meses
Puntos: 4
Respuesta: Mostrar imagenes desde Javascript a HTML

No te compliques la vida, con ésto funcionará:
Código HTML:
Ver original
  1. <script languaje="javascript">
  2. var contenedor=document.getElementById("imagen");
  3. var xx = parent.location.href;
  4. var xx = xx.toUpperCase();
  5. if (xx.indexOf('INDEX.ASP')!=-1){
  6. contenedor.src="images/LOGOHSI.JPG"
  7. }else{
  8. contenedor.src="../images/LOGOHSI.JPG"
  9. }
  10. <img id="imagen" width=168 height=66>