浏览器窗口加载和大小改变事件示例
更新时间:2014年02月27日 17:31:29 作者:
这篇文章主要介绍了浏览器窗口加载和大小改变事件,需要的朋友可以参考下
复制代码 代码如下:
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";
};
相关文章
JavaScript中net::ERR_CONNECTION_REFUSED解决方法大全
在一次测试中遇到了报net::ERR_CONNECTION_REFUSED的错误,五哦一下面这篇文章主要给大家介绍了关于JavaScript中net::ERR_CONNECTION_REFUSED解决方法的相关资料,需要的朋友可以参考下2022-10-10JavaScript NaN和Infinity特殊值 [译]
本文要讲的是两个特殊值,NaN和Infinity,返回这两个值的操作通常都应该返回正常的数字2012-09-09html+css+js实现canvas跟随鼠标的小圆特效源码
这篇文章主要介绍了html+css+js实现canvas跟随鼠标的小圆特效源码,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下2021-03-03
最新评论