2011-03-27 68 views

回答

7

您可以檢出following article

$('#scrlBotm').click(function() { 
    $('html, body').animate({ 
     scrollTop: $(document).height() 
    }, 1500); 
    return false; 
}); 
+0

謝謝!我會盡快勾選標記! – nn2 2011-03-27 20:36:52

2

您可以使用此代碼。

$('html, body').animate({scrollTop: $("body").height()}, 800); 
1

你可以這樣做:

$(document).scrollTop($(document).height()); 

如果你想讓它在點擊:

$('#btn').click(function() { 
    $(document).scrollTop($(document).height()); 
}); 

demo 1demo 2