(Translated by https://www.hiragana.jp/)
Template:URL2 - 维基百科,自由的百科全书 とべ转到内容ないよう

Template:URL2

本页使用了标题或全文手工转换
维基百科ひゃっか自由じゆうてき百科ひゃっかぜん
文档图示 板文いたぶん[查看] [编辑] [历史] [きよしじょ缓存]

概要がいよう

[编辑]

Template:URLてきおさむ改版かいはん,适合よう于信いきかまちあずか其类同点どうてん

  • まいりすう省略しょうりゃくある为空时不显示にんなん内容ないようTemplate:URL则默认显しめせ{{URL|example.com|选的显示ぶんほん}}
  • 提供ていきょういち|msg=さんすう开启ある关闭{{URL|example.com|选的显示ぶんほん}}てき显示。msgさんすう为falseあるものにんなん以字ははnあるN开头,都会とかい关闭消息しょうそく,其他内容ないよう则使消息しょうそく为打开状态。
  • 提供ていきょうてきurlさんすうちゅうてきhtml标签wiki内部ないぶ链接标签かいじょ
  • urlさんすうざいくび个空かく处截どめ
  • 以将自身じしんてき输出さく为输いれ,从而以在しんいきかまちてき网站さんすうちゅうはま使用しよう,避免编者ざい条目じょうもくちゅう添加てんか|website={{URL|some.url.com}}まとだい码会导致てき解析かいせき错误。

用法ようほう

[编辑]
  • {{URL2|url}}
  • {{URL2|1=url}}

はんれい

[编辑]

あずかTemplate:URLてき

[编辑]

无输にゅう值时,URL2だま认不显示にんなん内容ないよう|msg=まいりすうひかえせい显示)。

  • {{URL2| }}
  • {{URL2|msg=yes| }}{{URL|example.com|选的显示ぶんほん}}
  • {{URL2|msg=true| }}{{URL|example.com|选的显示ぶんほん}}
  • {{URL2|msg=1| }}{{URL|example.com|选的显示ぶんほん}}

URL2のう处理しんいきかまちちゅうてき|website=かいぐういたてきつね见的格式かくしき

  • {{URL2|http://www.example.com|website}}website

あいどうこれ

[编辑]

ばんはた输出いれ<span class="url">...</span>并在ごと个句ごうぜん加入かにゅう<wbr/>元素げんそ

  • {{URL2|www.example.com}}www.example.com
    [http://www.example.com www.example.com]

The use of http://, https://, a protocol-relative URL, or a different protocol is preserved in the URL but is not shown in the link text:

  • {{URL2|http://www.example.com}}www.example.com
    [http://www.example.com www.example.com]
  • {{URL2|https://www.example.com}}www.example.com
    [https://www.example.com www.example.com]
  • {{URL2|//www.example.com}}www.example.com
    [//www.example.com www.example.com]
  • {{URL2|ftp://ftp.example.com}}ftp.example.com
    [ftp://ftp.example.com ftp.example.com]

If the path is only a slash (/) it is not displayed in the link text:

  • {{URL2|https://www.example.com/}}www.example.com
    [https://www.example.com/ www.example.com]

The template also adds <wbr/> before any displayed slashes (/) in the path:

  • {{URL2|https://www.example.com/path}}www.example.com/path
    [https://www.example.com/path www.example.com/path]

For a URL containing an equal sign (=), use |1=:

  • {{URL2|1=http://www.example.com/path?section=17}}www.example.com/path?section=17
    [http://www.example.com/path?section=17 www.example.com/path?section=17]

注意ちゅういごと

[编辑]

重定しげさだむかい

[编辑]

ばん编辑说明

[编辑]

ほろ格式かくしき

[编辑]

此模ばん给显しめせてきURLじょうclass="url"

まいり

[编辑]