¿Cómo obtener la altura máxima de pantalla disponible en java script?

document/window outerHeight provides the size of the window (e.g when the browser windows is re-sized the value changes ).

screen.availHeight gives you the actual screen size (including the actual browser navigation etc)

I tried creating a fixed div set with top:0,buttom:0 y obtener el outerHeight but it's also restricted to the window's current size.

What is the best way to get the max available height when the window is maximized ?

Gracias.

EDITAR

The answer, provided with the help of @Greg Burghardt is

screen.availHeight - (window.outerHeight - window.innerHeight)

preguntado el 28 de mayo de 14 a las 13:05

Couldn't you just set the div's height and width to 100%? -

@Juhana I'm using a control that requires explicit height. -

1 Respuestas

Puede que estés buscando:

document.documentElement.offset[Height|Width]

Una buena referencia: A Tale of Two Viewports

contestado el 28 de mayo de 14 a las 13:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.