如何获取内部浏览器窗口的高度并更改为表格高度? [英] How to get height of inner browser window and change to table height ?
本文介绍了如何获取内部浏览器窗口的高度并更改为表格高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
如何获取浏览器的内部高度并根据浏览器使用java脚本更改为表格高度,我正在使用母版页所以如果我打开每个页面我想要获得浏览器高度并更改为表格高度所以只有我得到完整的page.i意味着如果浏览器是最小化我捕获该高度并应用于表,所以不要滚动条并适合整页。
问候
Aravind
Hi
How to get inner height of browser and change to table height based on browser using java script,i am using master page so if i open each page i want get the browser height and change to table height so only i get full page.i mean if browser is minimize i capture that height and apply to table so not get scroll bar and fit in to full page.
Regards
Aravind
推荐答案
window.onresize
你可以完成这个过程。获得窗口高度
w = window.innerWidth || document.documentElement.clientWidth;
h = window.innerHeight || document.documentElement.clientHeight;
但一般情况下,您的表格会在调整窗口大小时调整大小。
将你的身高设为%,然后一般设定。
如果你把它放在像素上然后你需要高度,宽度......
window.onresize
you can do the process. to get the window height
w= window.innerWidth || document.documentElement.clientWidth;
h= window.innerHeight || document.documentElement.clientHeight;
but in general your table will be resized with your window resize.
put your height in % then it will be set in general.
if you put it on pixel then you will need height, width.....
这篇关于如何获取内部浏览器窗口的高度并更改为表格高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文