编辑“︁
Module:Random/doc
”︁(章节)
跳转到导航
跳转到搜索
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
== List == <code>list</code>可以随机输出一个物品列表。 {{#invoke:random|list|''list item 1''|''list item 2''|''list item 3''|...|sep=''separator''|limit=''number of items to display''|same=''yes''}} '''Named parameters''' * {{para|sep}} or {{para|separator}} - an optional separator for the list items. Some values are special; see the table below. * {{para|limit}} - the maximum number of list items to display. The lowest possible is 0 and the highest possible is the length of the list. * {{para|same}} - if this is set to "yes", "y", "true", or "1", the list order is the same for each module call on a given page. {| class="wikitable" |+ Possible separator values |- ! Code !! Output |- | <code>dot</code> || {{int:dot-separator}} |- | <code>pipe</code> || {{int:pipe-separator}} |- | <code>comma</code> || {{int:comma-separator}} |- | <code>tpt-languages</code> || {{int:tpt-languages-separator}} |- | <code>space</code> || ''a space'' |- | ''any other value'' || ''other values are used without modification'' |} You cannot input spaces directly to the {{para|sep}} parameter due to limitations in MediaWiki's template syntax. However, it is possible to work around this by using [[HTML entities]]. You can use <code>&#32;</code> to represent a normal space, and <code>&nbsp;</code> to represent a [[non-breaking space]]. '''Examples''' <small>({{purge|refresh|anchor=List}})</small> * <code><nowiki>{{#invoke:random|list|egg|beans|sausage|bacon|spam}}</nowiki></code> → {{#invoke:random|list|egg|beans|sausage|bacon|spam}} * <code><nowiki>{{#invoke:random|list|egg|beans|sausage|bacon|spam|sep=dot}}</nowiki></code> → {{#invoke:random|list|egg|beans|sausage|bacon|spam|sep=dot}} * <code><nowiki>{{#invoke:random|list|egg|beans|sausage|bacon|spam|sep=space}}</nowiki></code> → {{#invoke:random|list|egg|beans|sausage|bacon|spam|sep=space}} * <code><nowiki>{{#invoke:random|list|egg|beans|sausage|bacon|spam|sep=;&#32;}}</nowiki></code> → {{#invoke:random|list|egg|beans|sausage|bacon|spam|sep=; }} * <code><nowiki>{{#invoke:random|list|egg|beans|sausage|bacon|spam|sep=foo}}</nowiki></code> → {{#invoke:random|list|egg|beans|sausage|bacon|spam|sep=foo}} * <code><nowiki>{{#invoke:random|list|egg|beans|sausage|bacon|spam|limit=3}}</nowiki></code> → {{#invoke:random|list|egg|beans|sausage|bacon|spam|limit=3}} * <code><nowiki>{{#invoke:random|list|egg|beans|sausage|bacon|spam|same=yes}}</nowiki></code> → {{#invoke:random|list|egg|beans|sausage|bacon|spam|same=yes}} * <code><nowiki>{{#invoke:random|list|egg|beans|sausage|bacon|spam|same=yes}}</nowiki></code> → {{#invoke:random|list|egg|beans|sausage|bacon|spam|same=yes}}
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模块
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息