$(function(){ var h = $(document).height()-$(window).height(); $(document).scrollTop(h); }); \ window.onload = function(){ var h = document.documentElement.scrollHeight || document.body.scrollHeight; window.scrollTo(h,h); }
jQuery_offset和position var offset = $('.xxx').offset() console.log(offset.left.,offset.top)xxx相对于页面左上角的位置 var position = $('.xxx').position() console.log(position.left,position.top)xxx相对于父元素左上角的位置 $('.xxx').offset({left:50, top:100})设置位置 jQuery_scrol