浏览器窗口加载和大小改变事件示例_javascript技巧
程序员文章站
2022-05-17 13:10:48
...
复制代码 代码如下:
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";
};
上一篇: MySQL 增加新用户sql语句
下一篇: 实例优化ORACLE数据库性能