web网页中返回顶部怎么实现?

就像csdn的这个。是浮动的。到一定的位置才会显示出来。!!!!!!!!!!!!!!!!

scroll事件中判断document.body.scrollTop或者document.documentElement.scrollTop,超过多少显示浮动导航

javascript滚动到导航条时如何固定在顶部

http://jingyan.baidu.com/article/6181c3e0678e1a152ff15372.html

你直接将csdn的拿过来。 。

指向顶部具有id属性的标签就行了

$('.to-top').click(function(){$("html,body").animate({scrollTop :0}, 800);return false;});
$('.to-top')就是你要点击的回到顶部的按钮