基于jquery的获取浏览器窗口大小的代码

xiaoxiao2021-03-01  10

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

相关资源:带音效新年烟花动画特效-HTML-代码
转载请注明原文地址: https://www.6miu.com/read-3850030.html

最新回复(0)