<script language="javascript" type="text/javascript">
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 FitWindowSize = function() {
var height = getTotalHeight();
var width = getTotalWidth();
}
window.onresize = function() {
FitWindowSize();
}
FitWindowSize();
</script>
css 获取当前浏览器的大小
最新推荐文章于 2024-05-18 06:08:21 发布