在页面的顶部加入代码:
<a name="startPotion" ></a>
然后置顶按钮:
<input type="button" value="置顶" οnclick="toTop()">
js函数:function toTop(){
Window.location.href = "#startPotion"
}
置底的方法同置顶
在页面的顶部加入代码:
<a name="startPotion" ></a>
然后置顶按钮:
<input type="button" value="置顶" οnclick="toTop()">
js函数:function toTop(){
Window.location.href = "#startPotion"
}
置底的方法同置顶
转载于:https://www.cnblogs.com/loveLearning/archive/2012/06/09/2543579.html