var getPageSize = function () {
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
return { pWidth:pageWidth, pHeight:pageHeight, wWidth:windowWidth, wHeight:windowHeight };
}
分享到:
相关推荐
页面置换算法课设 private void FIFO_button1_Click(object sender, EventArgs e) { if (page.Length == 0 || strsize.Length == 0) MessageBox.Show("输入得页面序列或物理块数不能为空", "提示", ...
输入: 物理内存的页面数量 虚拟内存的页面数量 页面访问串(reference string) 算法选择(0-FIFO,1-optimal,2-LRU)
R.drawable.slider_horizontal)设置slider(左、右页面中间部分的)的图标,分为垂直的和水平的图标setSliderSize(int size)设置slider的宽度switchSliderVisitility();以动画方式切换setBaseOrientation(int ...
大多数页面平均需要40K的空间,像一些大型网站会包含数以千计的HTML 元素,页面Size会更大。 如何有效的降低HTML 代码的复杂度和页面元素的数量,本文主要解决了这个问题,从多个方面介绍了如何编写简练,清晰的HTML ...
如果能够通过查询条件查出每页结果的最后一条记录,在用最后一条记录作为查询条件去查下一页,这样每次都查询页面size条记录,效率不会差。 具体代码如下:包含mongodb.class.php, page.class.php, test.php ...
介绍了高效mongodb的php分页类,并且没有使用mongodb的skip来实现分页,需要... 如果能够通过查询条件查出每页结果的最后一条记录,在用最后一条记录作为查询条件去查下一页,这样每次都查询页面size条记录,效率不会差。
404页面2秒内自动跳转到首页 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ; charset=utf-8" /> 很抱歉,网站搬新家啦! ...
#define SIZE 4 //SIZE等于分配的内存块数加1 #define N 5 //可输入的页面数 #define OVERFLOW -2 #include #include //----------------------------------------------- 。。。。。。。。。。。。。。。。。。...
int size of v ; int size of vp ; int size of m ; int size of mp ; int max vp; int max mp; int lacks; PAGE vp adr; int mp flag; int v mem adr; int vp map mp; int mp map vp; protected: ...
<... <... charset=gb_2312-80″...– function doZoom(size){ document.getElementById(‘zoom’).style.fontSize=size+’px’ } var DOM = (document.getElementById) ? 1 : 0; var NS4 = (document
1.在首页做一个搜索框的样式并实现跳转到搜索页面 <icon class=searchcion size='20' type='search'> <input class= disabled placeholder=请输入关键字 value={{searchValue}}/> <view clas
页面链接显示文件的大小 在页面的连接文件如 <a href="a.mp3">a.mp23</a> 显示a文件的大小
能让界面上的控件随窗口大小任意缩放的代码onsize,就可以随心所遇的放大与缩小你的对话框了,控件也跟着比例缩小放大。
FONT-SIZE: 12px;FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;WIDTH: 60%; PADDING-LEFT: 25px; } /*CSS Digg style pagination*/ DIV.digg { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM...
定义和用法font-size 属性可设置字体的尺寸。说明该属性设置元素的字体大小。注意,实际上它设置的是字体中字符框的高度;...关于em值的使用问题用ctrl键加鼠标滚轮将页面放大,会带来一个算是小小的BUG,就
前言 ...找id的话就要到搜索页面找了,果然,在分析搜索页面之后,发现id就躺在静态页面中。 思路有了,准备写代码。。。 开始码代码 第一步当然是获取id了,通过分析搜索域名(不得不说jd的反爬机制,
页面转向的进度条 代码 <!--要完成此效果把如下代码加入到区域中--> <p><font color="#0000ff"><input name="chart" size="37" style="background-color: black; color: #FF0000; font-family: Arial; font-...
好看、大方不错的跳转页面 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ; charset=gb2312" /> 请稍后,正在为您转入... ;url=...
记住当前页面的大小,并在您再次切换到页面时恢复当前页面的大小。 通过使用此扩展程序,您可以让Chrome记住任意页面的首选大小,并在切换到页面的标签时将其还原。 默认情况下,扩展名为灰色。 要在页面上启用它,...
今天在百度知道看php相关资料时发现一个网友问一个wordpress安装提示错误的一个问题,说他在安装wordpress安装包时遇到这样一个问题:Fatal error:Allowed memory size of 67108864 bytes exhausted (tried to ...