> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/scroll/scroll-to-top.md).

# Scroll to top

Scroll to top 是命令浏览器立即将整个屏幕向上滚动回网页最初起始位置的动作。此动作完全自动运行，不附带任何配置参数。

🎥 观看更多操作指南视频：[点击这里](https://youtu.be/cCTEtuMtz-s)。

#### 实际示例：浏览内容后返回主菜单栏

当您设置数据抓取或交互脚本时，处理流程通常会将屏幕向下拉得很深，以加载更多文章（Lazy load）或阅读评论。向下浏览完成后，您希望返回页面顶部，以点击固定在最上方的搜索栏、通知面板或导航菜单栏：

* 应用方法：不必多次使用带负值参数的 Mouse scroll 动作（既耗时又难以精确定位滚动位置），您只需插入一个 Scroll to top 动作即可。
* 结果：浏览器将立即执行将屏幕迅速拉至网站最顶端的命令，使脚本能够快速且精确地准备好进行下一步操作。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/scroll/scroll-to-top.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
