Mi problema es el siguiente: Necesito que la imagen de fondo del body se expanda al tamaño de la ventana del browser y para eso estoy tratando de usar JS. Mi código disfuncional es el siguiente:
Código:
Se agradece cualquier ayuda. <script type="text/javascript"> function resize(){ var windowheight = window.screen.height; var windowwidth = window.screen.width; var bg = document.body.backgroundImage; if ( bg < windowheight ) { bg.style.height = windowheight;} and if ( bg < windowwidth ) { bg.style.width = windowwidth; } } </script>