Risoluzione orizzontale dello schermo in pixel screen.width -
Risoluzione verticale dello schermo in pixel screen.height -
Larghezza dello schermo utente disponibile per le applicazioni screen.availWidth -
Altezza dello schermo utente disponibile (senza la barra delle attività) per le applicazioni screen.availHeight -
Larghezza dello spazio visibile del browser
document.documentElement.offsetWidth
window.innerWidth -il ridemensionamento del browser dell'utente. Questo valore include la barra di scorrimento verticale
(se presente) ma non include la barra di barra di esplorazione o la Sidebar. Nota
Altezza dello spazio visibile del browser
document.documentElement.offsetHeight
window.innerHeight -Questo valore cambia dinamicamente in tempo reale durante il ridemensionamento del browser dell'utente. Questo valore include la barra di scorrimento orizzontale (se presente) ma non include la barra Suggerimento del giorno. Nota
Larghezza disponibile del browser dell'utente window.outerWidth -
Altezza disponibile del browser dell'utente window.outerHeight -
Larghezza della vista del documento all'interno di un'altezza specifica data della vista del browser document.documentElement.scrollWidth -
Altezza della vista del documento all'interno di un'altezza specifica data della vista del browser document.documentElement.scrollHeight -
Distanza orizzontale del bordo sinistro del browser utente dal lato sinistro dello schermo window.screenLeft window.screenX -
Questo valore cambia durante il ridimensionamento (non il movimento, almeno non ancora) della finestra del browser; questo valore puň essere negativo. MSIE 5+ calcola la distanza dalla sinistra dell'area dei contenuti (area cliente) al lato sinistro dello schermo. Nota
Distanza verticale del bordo superiore del browser utente dall'alto dello schermo window.screenTop window.screenY -
Questo valore cambia durante il ridimensionamento (non il movimento, almeno non ancora) della finestra del browser; questo valore puň essere negativo. MSIE 5+ calcola la distanza dall'alto dell'area dei contenuti (area cliente) al limite superiore dello schermo. Nota
Distanza orizzontale/offset orizzontale di questo <div> dal lato sinistro del suo blocco padre più vicino posizionato in modo assoluto o dal lato sinistro del layout: per questo documento è ScreenData.offsetLeft -
Distanza verticale/offset verticale di questo <div> dal lato superiore del suo blocco padre più vicino posizionato in modo assoluto o dal lato superiore del layout: per questo documento è ScreenData.offsetTop -
var Element = evt.target ;
var CalculatedTotalOffsetLeft = CalculatedTotalOffsetTop = 0 ;
while (Element.offsetParent)
{
CalculatedTotalOffsetLeft += Element.offsetLeft ;
CalculatedTotalOffsetTop += Element.offsetTop ;
Element = Element.offsetParent ;
} ;
OffsetXForNS6 = evt.pageX - CalculatedTotalOffsetLeft ;
OffsetYForNS6 = evt.pageY - CalculatedTotalOffsetTop ;
Peter-Paul Koch's Properties and manipulation (via methods) of the Window object page
MasterGrid for MSIE 4 and 5 (operating systems Windows and MacIntosh), Netscape 4 and 6
http://www.quirksmode.org/viewport/compatibility.html
Web Developper Virtual Library's Grand Unified Table: events and supported properties of the event object
for Netscape 4 and MSIE 4 and 5
http://www.wdvl.com/Authoring/JavaScript/Events/table4.html
MSDN's interactive demo on measurement, dimension and location (in compatible mode only; not in standard-compliant mode)
http://msdn.microsoft.com/workshop/samples/author/css/overview/interactivemeasurement.htm
MSDN's interactive demo on measurement, object's event, scroll positions, client area (in compatible mode only; not in standard-compliant mode)
http://msdn.microsoft.com/workshop/samples/author/dhtml/overview/measure.htm
MSDN's reference on object measurement and location, scroll position, DHTML positioning properties (in compatible mode only; not in standard-compliant mode)
http://msdn2.microsoft.com/en-us/library/ms533024.aspx
There is a major incompatibility between MSIE 5+ window.screenTop and NS 6+ window.screenY. MSIE 5+ calculates the distance from the top of the content area (client area) to the top side of the screen. NS 6+ calculates the distance from the top of the browser's window to the top side of the screen. There seems to be no way to figure out the height of chrome elements (menu bar, tools bar, address bar, links bar) present in the browser for MSIE 5+.
The same phenomenon is observed for MSIE 5+ window.screenLeft and NS 6+ window.screenX. MSIE 5+ calculates the distance from the left of the content area (client area) to the left side of the screen. NS 6+ calculates the distance from the left of the browser's window to the left side of the screen. When the MSIE 5+ Explorer Bar is displayed, we can clearly see that the window.screenLeft value is increased while when the NS 6+ Sidebar is displayed, the window.screenX value does not increase since the referenced coordinates system is different. The same phenomenon is observed for chrome bars at the top of the browser's application.
NS 6+ evt.layerX/Y properties calculate the distance from the left/top corner of an element if it is absolutely or relatively positioned; if it's not positioned, then the values are the distance from the left/top of its closest absolutely or relatively positioned containing element. In case the target element has no positioned element within the containment hierarchy, then the body element is the positioned containing element.
There appears to be 3 exceptions to this: input type="text", textarea and options in a select. When an event occurs in one of these 3 elements, regardless if they are positioned or not, the evt.layerX/Y properties will return the offset coordinates within them.
Here's an interactive demo on evt.layerX/Y property values.
MSIE 5+ event.offsetX/Y properties calculate the distance from the left/top corner of the target element (e.g. clicking inside an image) regardless if the element is absolutely or relatively positioned or if its containment element is positioned or not. There appears to be 4 exceptions to this: for A, H, P and SPAN elements, the event.offsetX/Y will return coordinates relative to the offsetParent (which is usually - not always - the closest positioned containing element), otherwise to the BODY element.
So NS 6+ evt.layerX/Y properties are not the equivalent of MSIE 5+ event.offsetX/Y properties.
Bugzilla Bug #460620; Target: ---
onresize events should fire while resizing horizontally and vertically the window, not just when the mouse stops moving