jquery 得到当前页面高度和宽度的两个函数

2016-02-19 13:47 0 1 收藏

想要天天向上,就要懂得享受学习。图老师为大家推荐jquery 得到当前页面高度和宽度的两个函数,精彩的内容需要你们用心的阅读。还在等什么快点来看看吧!

【 tulaoshi.com - Web开发 】

代码如下:

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/webkaifa/)
//======需引用jquery框架======//

//返回当前页面高度

function pageHeight(){
if($.browser.msie){
return document.compatMode == "CSS1Compat"? document.documentElement.clientHeight :
document.body.clientHeight;
}else{
return self.innerHeight;
}
};



//返回当前页面宽度
function pageWidth(){
if($.browser.msie){
return document.compatMode == "CSS1Compat"? document.documentElement.clientWidth :
document.body.clientWidth;
}else{
return self.innerWidth;
}
};

来源:https://www.tulaoshi.com/n/20160219/1605236.html

延伸阅读
标签: ASP
  一、 <% Response.Buffer = True % <% ' Setup the variables necessary to accomplish the task Dim TimerStart, TimerEnd, TimerNow, TimerWait ' How many seconds do you want them to wait... TimerWait = 5 ' Setup and start the timers TimerNow = Timer TimerStart = TimerNow TimerEnd = TimerStart + TimerWait ' Ke...
标签: Web开发
function request(paras){ //获取 url 的参数值,不区分大小写,如无此参数,返回空字符串. var url = location.href; var paraString = url.substring(url.indexOf("?")+1,url.length).split("&"); var paraObj = {} for (i=0; j=paraString[i]; i++){ p...
标签: ASP
  <% '--------------------------------------------------------------------------- '                   程序作用:打印request.form输入的所有值 '--------------------------------------------------------------------------- Res...
第一个: ------------------------------------------------------ 代码如下: #include stdio.h #include string.h void tell_me(int f(const char *, const char *)); int main(void) {    tell_me(strcmp);    tell_me(main);    return 0; } void tell_me(int f(const char *, const char *)) {  &n...
标签: PHP
  //在PHP中处理日期非常不方便,比如求两个日期之间相差的月份?该怎么办呢?  //文件名:date.inc.php3  //在使用这两个函数前,要先将日期或日期时间转换成timestamp类型。  //如:  //$today=mktime(0,0,0,date("m"),date("d"),date("Y"));  /****模拟sqlserver中的dateadd...

经验教程

466

收藏

36
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部