嗨以下所有脚本在chrome和firefox上运行正常但在IE11中没有。任何解决方案
window.onscroll = function (i)
{
window.innerHeight + window.scrollY >= document.body.offsetHeight ?
$("#str").removeClass("str_one") : $("#str").addClass("str_one")
};
答案 0 :(得分:0)
window.getWindowSize= function(){
if(window.innerWidth!= undefined){
return [window.innerWidth, window.innerHeight];
}
else{
var docBody= document.body,
docEle= document.documentElement;
return [Math.max(docEle.clientWidth, docBody.clientWidth),
Math.max(docEle.clientHeight, docBody.clientHeight)];
}
}