page resizing
<script type="text/javascript">
$(window).load(function () {
var root;
root = $("body").children();
var strWidth;
var strHeight;
//innerWidth / innerHeight / outerWidth / outerHeight
if (window.innerWidth && window.innerHeight && window.outerWidth && window.outerHeight) {
strWidth = $(root).outerWidth(true) + (window.outerWidth - window.innerWidth);
strHeight = $(root).outerHeight(true) + (window.outerHeight - window.innerHeight);
}
else {
var strDocumentWidth = $(document).outerWidth(true);
var strDocumentHeight = $(document).outerHeight(true);
window.resizeTo(strDocumentWidth, strDocumentHeight); //IE 必须 resize 2次
var strMenuWidth = strDocumentWidth - $(window).width();
var strMenuHeight = strDocumentHeight - $(window).height();
strWidth = $(root).outerWidth(true) + strMenuWidth;
strHeight = $(root).outerHeight(true) + strMenuHeight;
}
//resize
window.resizeTo(strWidth, strHeight);
});
</script>
page resizing的更多相关文章
- 我这么玩Web Api(一):帮助页面或用户手册(Microsoft and Swashbuckle Help Page)
前言 你需要为客户编写Api调用手册?你需要测试你的Api接口?你需要和前端进行接口对接?那么这篇文章应该可以帮到你.本文将介绍创建Web Api 帮助文档页面的两种方式,Microsoft Help ...
- HTML5 Page Visibility
什么是 Page Visibility ? Page Visibility 即页面可见性,通过 visibilityState 的值检测页面当前是否可见.当一个网站是可见或点击选中的状态时 Page ...
- angularjs 1 开发简单案例(包含common.js,service.js,controller.js,page)
common.js var app = angular.module('app', ['ngFileUpload']) .factory('SV_Common', function ($http) { ...
- Selenium的PO模式(Page Object Model)[python版]
Page Object Model 简称POM 普通的测试用例代码: .... #测试用例 def test_login_mail(self): driver = self.driver driv ...
- SharePoint2013 Set a custom application page as site welcome page
本文主要介绍如何添加一个custom application page as site welcome page 1.首先创建一个sharepoint 2013 empty solution, add ...
- 使用page object模式抓取几个主要城市的pm2.5并从小到大排序后写入txt文档
#coding=utf-8from time import sleepimport unittestfrom selenium import webdriverfrom selenium.webdri ...
- github page+jekyll搭博客初体验
div.oembedall-githubrepos { border: 1px solid #DDD; list-style-type: none; margin: 0 0 10px; padding ...
- selenium page object & Page Factory
package demo; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa ...
- <%@ page trimDirectiveWhitespaces="true" %>
我们经常会在JSP页面上使用: <%@ page trimDirectiveWhitespaces="true" %> 这个命令可以使jsp输出的html时去除多余的空 ...
随机推荐
- PyAMF and django ForeignKey
In order to support this, PyAMF needs to provide a synonym mapping between fields. Until then, you c ...
- Android & CM build basics
[CM source code folders] bootable/Among other things, the source for ClockworkMod recovery is in her ...
- 解决mysql“Access denied for user 'root'@'localhost'”
解决mysql“Access denied for user 'root'@'localhost'” 分类: linux 2011-01-14 00:23 147547人阅读 评论(3) 收藏 举报 ...
- 红黑树(三)之 Linux内核中红黑树的经典实现
概要 前面分别介绍了红黑树的理论知识 以及 通过C语言实现了红黑树.本章继续会红黑树进行介绍,下面将Linux 内核中的红黑树单独移植出来进行测试验证.若读者对红黑树的理论知识不熟悉,建立先学习红黑树 ...
- So Easy!让开发人员更轻松的工具和资源
这篇文章给大家分享让开发人员生活更轻松的免费工具和资源.所以,如果你正在寻找一些为迅速解决每天碰到的设计和开发问题的工具和资源,不要再观望,试试这些工具吧.这些奇妙的工具不仅会加快您的生产,也让你的工 ...
- [Windows] 批处理文件系统服务控制
在cmd下可有两种方法打开,net和sc. net只能用于用于打开没有被禁用的服务. 启动: net start 服务名 停止: net stop 服务名 sc可打开被禁用的服务. sc config ...
- How to manage the certificates in the PC
1.open Run command. 2.enter 'mmc' . 3.Click File, and Add or Remove Snap-in. 4.Select Certificates, ...
- WebApi传参总动员(二)
上篇,从最简单的string入手.本篇演示了从请求的输入流中获取实体.api: public class ValuesController : ApiController { [HttpPost] p ...
- 泛函编程(21)-泛函数据类型-Monoid
Monoid是数学范畴理论(category theory)中的一个特殊范畴(category).不过我并没有打算花时间从范畴理论的角度去介绍Monoid,而是希望从一个程序员的角度去分析Monoid ...
- [moka同学笔记]window下redis的安装以及php-redis详细配置(摘录)
(注意对应的版本)下载地址:https://github.com/phpredis/phpredis/downloads 首先下载redis安装,windows下安装软件都是下一步下一步over,就不 ...