For faster navigation, this Iframe is preloading the Wikiwand page for 帮助:随机显示.

帮助:随机显示

随机功能通过解析器函数功能和数学模块的随机函数产生随机数来产生随机提示。

注意[编辑]

  • 随机功能是提供给以下用途的:
    • 测试
    • 随机显示条目
    • 首页一些项目
    • 等等
但是,禁止用于条目当中,否则会被视为破坏

代码[编辑]

((#switch: ((#invoke:Math|random|总数))
|1=第一条内容
|2=第二条内容
...
|100=第一百条内容
))

当中的总数指共有多少条随机项目,请输入时去除两方的“隐藏”代码。

或者用下列代码:

((#invoke:random|item
|1=第一条内容
|2=第二条内容
...
|100=第一百条内容
))

但若是阁下想使用*做为每一句开头的话,可以这样使用:

((#invoke:rand|randitem
*第一条内容
*第二条内容
...
*第一百条内容
))

另外也可以自己指定分隔符(注意第二个参数不要塞入空格),例如:

(( #invoke:rand | randitem | 1,2,3,4,5,6 |,))

为了便于编辑,可创建单独的页面,然后通过(())来引用,例如:

Help:随机显示/Notices:
*第一条内容
*第二条内容
...
*第一百条内容
<noinclude>((doc))</noinclude>
本页中:
(( #invoke:rand | randitem | ((Help:随机显示/Notices)) ))

当然,这样做的话,请把无关内容用<noinclude>...</noinclude>包上。

示例[编辑]

你所输入的 你所看到的
((#switch: ((#invoke:Math|random|5))
|1=A
|2=B
|3=C
|4=D
|5=E
))
D

用户可以通过在链接后方加入?action=purge刷新,或者点击这里

{{bottomLinkPreText}} {{bottomLinkText}}
帮助:随机显示
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?