语法
¥Syntax
{@tutorial tutorialID} [link text]{@tutorial tutorialID}
概述
¥Overview
{@tutorial} 内联标记创建指向你指定的教程标识符的链接。当你使用 {@tutorial} 标记时,你还可以使用几种不同格式之一提供链接文本。如果你不提供任何链接文本,JSDoc 将使用教程的标题作为链接文本。
¥The {@tutorial} inline tag creates a link to the tutorial identifier that you specify. When you
use the {@tutorial} tag, you can also provide link text, using one of several different formats.
If you don't provide any link text, JSDoc uses the tutorial's title as the link text.
如果你需要链接到名称路径或 URL,请使用 {@link} 内嵌标签 而不是 {@tutorial} 标记。
¥If you need to link to a namepath or a URL, use the {@link} inline tag instead
of the {@tutorial} tag.
示例
¥Examples
以下示例显示了为 {@tutorial} 标记提供链接文本的所有方法:
¥The following example shows all of the ways to provide link text for the {@tutorial} tag:
/**
* See {@tutorial gettingstarted} and [Configuring the Dashboard]{@tutorial dashboard}.
* For more information, see {@tutorial create|Creating a Widget} and
* {@tutorial destroy Destroying a Widget}.
*/
function myFunction() {}
如果定义了所有这些教程,并且 gettingstarted 教程的标题是 "入门,",则上面的示例将生成类似于以下内容的输出:
¥If all of these tutorials are defined, and the title of the gettingstarted tutorial is "Getting
Started," the example above produces output similar to the following:
See <a href="tutorial-gettingstarted.html">Getting Started</a> and
<a href="tutorial-dashboard.html">Configuring the Dashboard</a>.
For more information, see <a href="tutorial-create.html">Creating a Widget</a> and
<a href="tutorial-destroy.html">Destroying a Widget</a>.