【发布时间】:2011-08-20 09:09:57
【问题描述】:
var items = Array(523, 3452, 334, 31, ..., 5346);
如何从items 获取随机物品?
【问题讨论】:
-
答案不会涉及jQuery
-
我从来没有见过这么多对一个问题的完全相同的回答......
-
伟大的思想,@Blindy
-
我找到了一种涉及 jQuery 的方法! (见我的第二个答案)
-
这个问题与Getting random value from an array 完全一样,但是 Mighty Mods 已经 3 年多没有费心去关闭它了。相反,他们关闭了"unconstructive" questions with hundreds of votes。
标签: javascript arrays random