手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >浏览器窗口加载和大小改变事件示例
浏览器窗口加载和大小改变事件示例
摘要:复制代码代码如下:window.onload=function(){varheight=document.body.clientHeight...

复制代码 代码如下:

window.onload = function() {

var height = document.body.clientHeight;

document.getElementById("vivS").style.height = (height - 20) + "px";

document.getElementById("emd").style.height = (height - 20) + "px";

document.getElementById("ob").style.height = (height - 20) + "px";

};

window.onresize = function() {

height = document.body.clientHeight;

document.getElementById("vivS").style.height = (height - 20) + "px";

document.getElementById("emd").style.height = (height - 20) + "px";

document.getElementById("ob").style.height = (height - 20) + "px";

};

【浏览器窗口加载和大小改变事件示例】相关文章:

Jquery跨浏览器文本复制插件Zero Clipboard的使用方法

Javascript递归打印Document层次关系实例分析

根据内容自动调整弹出窗口大小的JS解决方案

JavaScript中的bold()方法使用详解

javascript瀑布流式图片懒加载实例

图片加载进度实时显示

JavaScript实现广告的关闭与显示效果实例

js实现顶部可折叠的菜单工具栏效果实例

JQuery中DOM加载与事件执行实例分析

精通JavaScript的this关键字

精品推荐
分类导航