> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/thymeleaf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/thymeleaf/i.-using-thymeleaf/13-wen-ben-mo-ban-mo-shi/13.3-textual-prototype-only-comment-blocks-adding-code.md).

# 13.3 文本原型注释块：添加代码

`JAVASCRIPT`和`CSS`模版模式（`TEXT`不可用）允许在一句特殊的注释语法之间包含代码。当处理模版时，Thymeleaf将自动取消注释：

```javascript
var x = 23;

/*[+

var msg  = "This is a working application";

+]*/

var f = function() {
    ...
```

将会当作以下内容执行：

```javascript
var x = 23;

var msg  = "This is a working application";

var f = function() {
...
```

你可以在这些注释里包含表达式。它们会被执行：

```javascript
var x = 23;

/*[+

var msg  = "Hello, " + [[${session.user.name}]];

+]*/

var f = function() {
...
```


---

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

```
GET https://jack80342.gitbook.io/thymeleaf/i.-using-thymeleaf/13-wen-ben-mo-ban-mo-shi/13.3-textual-prototype-only-comment-blocks-adding-code.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.
