![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
12/07/2010, 18:57
|
| | Fecha de Ingreso: mayo-2009
Mensajes: 111
Antigüedad: 15 años, 8 meses Puntos: 2 | |
Onresize Hola a todos.
les comento que soy nuevo en el java y no e podido realizar la funcion on resize para que un fondo se me adapte al navegador alguien tiene algun tuto de como hacerlo.
<script language=javascript>
function ini()
{
var elFondo = document.getElementById("fondo").
style;
var ancho = document.body.clientWidth;
var alto = document.body.clientHeight;
elFondo.
width = ancho;
elFondo.height = alto;
}
</script>
<body style="margin:0" onload=ini() onresize=ini()>
<div style="position: relative">
<div style="position:absolute; top:0; left:0;">
<img src="fondo.png" id=fondo style="position: absolute;top:0; left: 0; width:0;left:0"height="100%">
</div>
Este es el codigo pero no e podido utilizarlo
Gracias |