具体方法:
function getTotalHeight(){ if($.browser.msie){ return document.compatMode == "CSS1Compat"? document.documentElement.clientHeight : document.body.clientHeight; }else{ return self.innerHeight; } } function getTotalWidth (){ if($.browser.msie){ return document.compatMode == "CSS1Compat"? document.documentElement.clientWidth : document.body.clientWidth; }else{ return self.innerWidth; } }
from: http://www.blogjava.net/alexwan/archive/2008/10/22/235827.html