[导入]scrollLeft scrollTop clientWidth clientHeight 各浏览器修正
var bodyScrollLeft,bodyScrollTop;
if(window.pageXOffset){bodyScrollLeft=window.pageXOffset}else if(document.documentElement&&document.documentElement.scrollLeft){bodyScrollLeft=document.documentElement.scrollLeft}else if(document.body){bodyScrollLeft=document.body.scrollLeft}
if(window.pageYOffset){bodyScrollTop=window.pageYOffset}else if(document.documentElement&&document.documentElement.scrollTop){bodyScrollTop=document.documentElement.scrollTop}else if(document.body){bodyScrollTop=document.body.scrollTop}
var bodyClientWidth,bodyClientHeight;
if(window.innerWidth){bodyClientWidth=window.innerWidth}else if(document.documentElement&&document.documentElement.clientWidth){bodyClientWidth=document.documentElement.clientWidth}else if(document.body){bodyClientWidth=document.body.clientWidth}
if(window.innerHeight){bodyClientHeight=window.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){bodyClientHeight=document.documentElement.clientHeight}else if(document.body){bodyClientHeight=document.body.clientHeight}
文章来源:http://Jorkin.Reallydo.Com/default.asp?id=555
if(window.pageXOffset){bodyScrollLeft=window.pageXOffset}else if(document.documentElement&&document.documentElement.scrollLeft){bodyScrollLeft=document.documentElement.scrollLeft}else if(document.body){bodyScrollLeft=document.body.scrollLeft}
if(window.pageYOffset){bodyScrollTop=window.pageYOffset}else if(document.documentElement&&document.documentElement.scrollTop){bodyScrollTop=document.documentElement.scrollTop}else if(document.body){bodyScrollTop=document.body.scrollTop}
var bodyClientWidth,bodyClientHeight;
if(window.innerWidth){bodyClientWidth=window.innerWidth}else if(document.documentElement&&document.documentElement.clientWidth){bodyClientWidth=document.documentElement.clientWidth}else if(document.body){bodyClientWidth=document.body.clientWidth}
if(window.innerHeight){bodyClientHeight=window.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){bodyClientHeight=document.documentElement.clientHeight}else if(document.body){bodyClientHeight=document.body.clientHeight}
文章来源:http://Jorkin.Reallydo.Com/default.asp?id=555