# 获取文本 (Get text)

您需要选择一个元素，然后脚本将获取该元素中包含的文本值并保存到您选择的变量中。

<figure><img src="/files/hcJxmC3ULlMi5RRhFMbY" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="258">参数</th><th>说明</th></tr></thead><tbody><tr><td>Select element</td><td>输入包含要获取的文本的元素的 CSS 选择器</td></tr><tr><td>Element order</td><td>根据元素在页面上出现的顺序选择元素</td></tr><tr><td>Output variable</td><td>将提取的元素保存为变量并输入变量名称</td></tr></tbody></table>


---

# Agent Instructions: 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:

```
GET https://docs.hidemium.io/zi-dong-hua-yong-hu-shou-ce/shu-ju-data/huo-qu-wen-ben-get-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
