$(document).ready(function() {
$(".rightbutton").click(function(){
alert( $(this).offset().top );//(iframe里或者页面里)当前操作对象距离浏览器顶部的距离
alert($(window).scrollTop());//滚动条距离浏览器顶部的距离
alert($(window).height());//本页面或者本iframe 的高度
alert($(document).height());//(跳出iframe) 当前操作对象距离浏览器顶部的距离
alert( document.documentElement.clientHeight);//本页面或者本iframe 的高度
$(".rightbutton").click(function(){
alert( $(this).offset().top );//(iframe里或者页面里)当前操作对象距离浏览器顶部的距离
alert($(window).scrollTop());//滚动条距离浏览器顶部的距离
alert($(window).height());//本页面或者本iframe 的高度
alert($(document).height());//(跳出iframe) 当前操作对象距离浏览器顶部的距离
alert( document.documentElement.clientHeight);//本页面或者本iframe 的高度
var doc = document, win = window,
scrollBottom = $(doc).height() - $(win).height() - $(win).scrollTop();//滚动条底部距离html页面底部的距离 与scrollTop()方法对应
});
});