在页面的顶部加入代码:

<a name="startPotion" ></a>

然后置顶按钮:

<input type="button" value="置顶" onclick="toTop()">

js函数:function toTop(){

    Window.location.href = "#startPotion"

}

 

置底的方法同置顶

相关文章:

  • 2022-12-23
  • 2021-09-12
  • 2021-04-27
  • 2021-11-07
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案