为什么if里调用方法的时候没加括号?
window.onscroll = function () {
if (checkScrollSLide) {
};
}
function checkScrollSLide () {
var main = document.getElementById('main');
var box = getByClass(main, 'box');
var lastBoxHeight = box[box.length - 1].offsetTop + Math.floor(box[box.length - 1].offsetHeight / 2);
var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
var bowserHeight = document.body.clientHeight || document.documentElement.clientHeight;
return (lastBoxHeight < scrollTop + bowserHeight) ? true : false;
}