标签:ntb height block 导航 resize span element bug 底部
代码如下:
function focus_footer(h){ window.onresize = function() { if (document.body.scrollHeight < h) { document.getElementById(‘footer‘).style.display = "none"; } else { document.getElementById(‘footer‘).style.display = "block"; } }; }
最后一步就在需要的页面执行:
var h = document.body.scrollHeight; focus_footer(h);
标签:ntb height block 导航 resize span element bug 底部
原文地址:http://www.cnblogs.com/xushengguan/p/7750142.html