occhio che IE non permette di conoscere queste dimensioni prima che sia stato aperto il tag <body>codice:function rW(){ return (window.innerWidth)?window.innerWidth: (document.documentElement.clientWidth)?document.documentElement.clientWidth: (document.body.clientWidth)?document.body.clientWidth:0; } function rH(){ return (window.innerHeight)?window.innerHeight: (document.documentElement.clientHeight)?document.documentElement.clientHeight: (document.body.clientHeight)?document.body.clientHeight:0; } alert(rW()+','+rH());
o richiami l' alert onload sul body o cmq inserisci l' istruzione tra tag <script> subito dopo l' apertura del body...
ciao

Rispondi quotando