joblog/WebContent/js/layout.js
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
window.onload = function(){
var pageHeight = document.body.scrollHeight || document.documentElement.scrollHeight;
var bottom = document.getElementsByClassName("bottom")[0];
var clientHeight = getViewPort();
/*if(pageHeight > clientHeight){
//alert('出现滚动条了');
bottom.style.position= "static";
}
else{
bottom.style.position = "fixed";
}*/
//iframe高度自适应
autoFrameHeight("myframe");
//自适应左右两个div的高度
setSideHeight();
};
//var pageHeight = document.body.scrollHeight || document.documentElement.scrollHeight;
//var bottom = document.getElementsByClassName("bottom")[0];
//var clientHeight = getViewPort();
//if(pageHeight > clientHeight){
// //alert('出现滚动条了');
// bottom.style.position= "static";
//}
//else{
// bottom.style.position = "fixed";
//}
//alert("页面内容高度:"+height+" 可视区域高度:"+clientHeight);
//获取页面视口大小
function getViewPort(){
if(document.documentElement){
return document.documentElement.clientHeight;
}
else{
return document.body.clientHeight;
}
}
//获取iframe的内容高度
function getIframePageHeight(frameId){
var pageHeight;
var frame = document.getElementById(frameId);
//获取内部document对象
var subDoc = frame.contentDocument || frame.contentWindow.document;
if(subDoc.documentElement){
pageHeight = subDoc.documentElement.scrollHeight;
}
else{
pageHeight = subDoc.body.scrollHeight;
}
return pageHeight;
}
//iframe高度自适应
function autoFrameHeight(frameId){
var pageHeight = getIframePageHeight(frameId);
var frame = document.getElementById(frameId);
frame.style.height = pageHeight+"px";
}
后面还有 19 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
