今天正好用到这个,就网上搜了搜,贴出来了。如果对你有帮助,不胜荣幸。

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;
 }
}

var do_height = getTotalHeight();
var do_width = getTotalWidth();
alert("do_height=="+do_height+"\ndo_width=="+do_width);

相关文章:

  • 2021-11-27
  • 2021-11-27
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2021-11-27
相关资源
相似解决方案