For faster navigation, this Iframe is preloading the Wikiwand page for Help:隨機顯示.

Help:隨機顯示

隨機功能透過解析器函数功能和數學模組的隨機函數產生隨機數來產生隨機提示。

注意[编辑]

  • 隨機功能是提供給以下用途的:
    • 測試
    • 隨機顯示條目
    • 首頁一些項目
    • 等等
但是,禁止用於條目當中,否則會被視為破壞

代碼[编辑]

((#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
))
A

用戶可以透過在連結後方加入?action=purge刷新,或者点击这里

{{bottomLinkPreText}} {{bottomLinkText}}
Help:隨機顯示
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?