模板6:Tabber窗口切换/doc

来自istudylinux
Istudylinux讨论 | 贡献2022年11月20日 (日) 15:41的版本 (创建页面,内容为“This template is used, together with 模板:TabbedWindowEnd, to create the a tabbed window interface in documentation, e.g. for code snippets in multiple programming languages. The tabs will be created from the level 3 headings between the start/end templates. The template relies on Gadget-tabbedwindow.js. It can be used in the API, Help, Manual and the main namespace. == Example == <pre> {{TabbedWindowBegin}} === Python =…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

This template is used, together with 模板:TabbedWindowEnd, to create the a tabbed window interface in documentation, e.g. for code snippets in multiple programming languages. The tabs will be created from the level 3 headings between the start/end templates.

The template relies on Gadget-tabbedwindow.js. It can be used in the API, Help, Manual and the main namespace.

Example

{{TabbedWindowBegin}}
=== Python ===
<syntaxhighlight lang="Python" line='line'>
code
</syntaxhighlight>

=== JavaScript ===
<syntaxhighlight lang="javascript" line='line'>
code
</syntaxhighlight>
{{TabbedWindowEnd}}

Python

code

JavaScript

code