var Doc = function() {
var content;
return {
init: function() {
content = $("#content");
Doc.resize();
window.onresize = Doc.resize;
},
resize: function() {
if (!content)
return;
var el = content.get(0);
var offset = el.offsetTop + (el.offsetHeight - content.height());
content.height(document.documentElement.clientHeight - offset);
}
};
}();
$(document).ready(Doc.init);
//2调整数据区高度
function resizeArea() {
var list = $("#datas")[0];
//网页可见区域宽:document.body.clientWidth
var dh = document.documentElement.clientHeight/ document.body.clientWidth;//网页可见区域高
var h = (dh - list.offsetTop);//list.offsetTop数据可见区域高(包括边线和滚动条)
if (h>0) {
list.style.height = h + "px";
}
}
$(function() {
resizeArea();
window.onresize = resizeArea;
});
var content;
return {
init: function() {
content = $("#content");
Doc.resize();
window.onresize = Doc.resize;
},
resize: function() {
if (!content)
return;
var el = content.get(0);
var offset = el.offsetTop + (el.offsetHeight - content.height());
content.height(document.documentElement.clientHeight - offset);
}
};
}();
$(document).ready(Doc.init);
//2调整数据区高度
function resizeArea() {
var list = $("#datas")[0];
//网页可见区域宽:document.body.clientWidth
var dh = document.documentElement.clientHeight/ document.body.clientWidth;//网页可见区域高
var h = (dh - list.offsetTop);//list.offsetTop数据可见区域高(包括边线和滚动条)
if (h>0) {
list.style.height = h + "px";
}
}
$(function() {
resizeArea();
window.onresize = resizeArea;
});