如何使用浏览器窗口的大小? [英] how to work with size of the browser window ?

查看:94
本文介绍了如何使用浏览器窗口的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

var wh = $(document.documentElement.clientHeight).height();

var tH = $('。a_Top')。height();

var bH = $('。a_BottomBar_b')。height();

$('。a_ContentOuter')。css('min-height',(wh)+'px');

$('。a_ContentInner')。css('min- height',(wh-(tH + bH + 29))+'px');





我正在编写此代码一个函数但是当我在Firefox中打开这个页面时,这将是一个错误,当我们评论这整个代码时它会没问题,所以请给我建议和帮助找出使用这个代码的正确方法... 。

var wh = $(document.documentElement.clientHeight).height();
var tH = $('.a_Top').height();
var bH = $('.a_BottomBar_b').height();
$('.a_ContentOuter').css('min-height',(wh)+'px');
$('.a_ContentInner').css('min-height',(wh-(tH+bH+29))+'px');


I am writing this code in a function but when i open this page in Firefox, it will be a error and when we comment on this whole code it will be fine, so please give me the suggestion and help to find out the right way to use this code ....

推荐答案

(document.documentElement.clientHeight).height();

var tH =
(document.documentElement.clientHeight).height();
var tH =


('。a_Top')。height();

var bH =
('.a_Top').height();
var bH =


('。a_BottomBar_b')。height();
('.a_BottomBar_b').height();


这篇关于如何使用浏览器窗口的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆