![]() | 此Template被引用於約50,000個頁面。 為了避免造成大規模的影響,所有對此Template的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此Template中,但是修改前請務必於討論頁發起討論。 模板引用數量會自動更新。 |
![]() | 此模板使用Lua语言: |
本模版用于生成格式化的外部链接。本模板生成的链接会使用<wbr>
进行处理,方便浏览器自动换行。
((URL|1=url name|2=optional display text))
如果网址中含有等号(“=”),需指定参数|1=
((URL | 1=https://example.com/?id=42 ))
→ example<span class="url">[https://example.com/?id=42 example<wbr/>.com?id=42]</span>
此时,如果指定标题,第二个参数也需显式标示:
((URL | 1=https://example.com/?id=42 | 2=Title ))
→ Title<span class="url">[https://example.com/?id=42 Title]</span>
Code | Result |
---|---|
(( URL )) | ((URL|example.com|可选的显示文本))
|
(( URL | )) | ((URL|example.com|可选的显示文本))
|
((URL ||example)) | example |
(( URL | EXAMPLE.com )) | example |
(( URL | example.com )) | example |
(( URL | www.example.com )) | www |
(( URL | http://www.example.com )) | www |
(( URL | https://www.example.com )) | www |
(( URL | ftp://www.example.com )) | www |
(( URL | ftp://ftp.example.com )) | ftp |
(( URL | http://www.example.com/ )) | www |
(( URL | http://www.example.com/path )) | www |
(( URL | www.example.com/foo )) | www |
(( URL | http://www.example.com/foo | link )) | link |
(( URL | www.example.com/foo | link )) | link |
(( URL | http://www.example.com/path/ )) | www |
(( URL | www.example.com/foo/ )) | www |
(( URL | http://www.example.com/foo/ | link )) | link |
(( URL | www.example.com/foo/ | link )) | link |
The template wraps the displayed URL with a class="url"
so that it is included in any parent microformat which takes a URL parameter - see our microformats project.
|
上述文档嵌入自Template:URL/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (编辑 | 差异)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |