Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/12/2009, 16:44
betodaniel61
Usuario no validado
 
Fecha de Ingreso: abril-2009
Ubicación: Buenos Aires
Mensajes: 413
Antigüedad: 15 años
Puntos: 3
Respuesta: Mostrar imagenes desde Javascript a HTML

Amigo, lo hice asi, y no funciona
Tengo dudas con <img src='contenedor.appendChild(img)'; />
esta bien??
Desde ya Muchas Gracias


<script languaje="javascript">
var xx = parent.location.href;
var xx = xx.toUpperCase()
if (xx.indexOf('INDEX.ASP')!=-1)
{
var contenedor = document.createElementById('contenedor');
var img=document.createElement('img');
img.setAttribute("src","images/LOGOHSI.JPG");
img.setAttribute("width","168");
img.setAttribute("height","66");
}
else
{
var contenedor = document.createElementById('contenedor');
var img=document.createElement('img');
img.setAttribute("src","../images/LOGOHSI.JPG");
img.setAttribute("width","168");
img.setAttribute("height","66");
}
</script>
<img src='contenedor.appendChild(img)'; />