
13/09/2004, 06:11
|
 | Moderador extraterrestre | | Fecha de Ingreso: diciembre-2001 Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 3 meses Puntos: 61 | |
Pon:
<script>
if (_i.height < _i.width){
document.write ("<img src='oficina.JPG' width='100' height='150'>")
}
else{
document.write ("<img src='oficina.JPG' width='150' height='100'>")
}
</script>
Otra forma sería:
<script>
x=(_i.height < _i.width)?100:150;
y=(_i.height < _i.width)?150:100;
document.write("<img src='oficina.JPG' width='"+x+"' height='"+y+"'>");
</script>
Pero la primera funcionará estupendamente.
__________________ Cómo escribir
No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia. |