> 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/cao-zuo-zhi-nan/scroll/scroll-to-top.md).

# 滚动到顶部

Scroll to top 是一个命令，指示浏览器立即将整个屏幕滚动回网页的初始位置。此操作完全自动执行，并且没有任何附带的配置参数。

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

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

* 应用方法：与其多次使用带有负参数的鼠标滚动操作（这会浪费时间且难以精确调整滚动级别），您只需插入一个 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/cao-zuo-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.
